aboutsummaryrefslogtreecommitdiff
path: root/modules/network/net.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2010-08-15 18:36:25 -0300
committerLeandro Pereira <leandro@hardinfo.org>2010-08-15 18:36:25 -0300
commit9fda18663f31e67d8c1c50e1c5a1888abceda2a6 (patch)
treea680bd9c701eaec1016d6beb28bf2c79cfc538e0 /modules/network/net.c
parent9fe6a457e1d9d01f6645d91805691afd429d0a2c (diff)
Fix potential problems found by clang static analyzer.
Diffstat (limited to 'modules/network/net.c')
-rw-r--r--modules/network/net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/network/net.c b/modules/network/net.c
index c0432522..65282b4a 100644
--- a/modules/network/net.c
+++ b/modules/network/net.c
@@ -121,21 +121,21 @@ void get_wireless_info(int fd, NetInfo *netinfo)
wi_req.u.essid.length = IW_ESSID_MAX_SIZE + 1;
wi_req.u.essid.flags = 0;
- if ((r = ioctl(fd, SIOCGIWESSID, &wi_req) < 0)) {
+ if (ioctl(fd, SIOCGIWESSID, &wi_req) < 0) {
strcpy(netinfo->wi_essid, "");
} else {
netinfo->wi_essid[wi_req.u.essid.length] = '\0';
}
/* obtain bit rate */
- if ((r = ioctl(fd, SIOCGIWRATE, &wi_req) < 0)) {
+ if (ioctl(fd, SIOCGIWRATE, &wi_req) < 0) {
netinfo->wi_rate = 0;
} else {
netinfo->wi_rate = wi_req.u.bitrate.value;
}
/* obtain operation mode */
- if ((r = ioctl(fd, SIOCGIWMODE, &wi_req) < 0)) {
+ if (ioctl(fd, SIOCGIWMODE, &wi_req) < 0) {
netinfo->wi_mode = 0;
} else {
if (wi_req.u.mode >= 0 && wi_req.u.mode < 6) {
@@ -147,7 +147,7 @@ void get_wireless_info(int fd, NetInfo *netinfo)
#if WIRELESS_EXT >= 10
/* obtain txpower */
- if ((r = ioctl(fd, SIOCGIWTXPOW, &wi_req) < 0)) {
+ if (ioctl(fd, SIOCGIWTXPOW, &wi_req) < 0) {
netinfo->wi_has_txpower = FALSE;
} else {
netinfo->wi_has_txpower = TRUE;