summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-10-31 15:57:48 +0100
committerThomas Haller <thaller@redhat.com>2013-11-13 15:29:24 +0100
commit7fd4d354635961872b28d96f240480b401986315 (patch)
tree3f2bcb25216d94d110f048d3526055195ab9296c
parentd0abf6500425090e6e966dfe18e80e3e98ca7742 (diff)
downloadNetworkManager-7fd4d354635961872b28d96f240480b401986315.tar.gz
core: fix setting wifi quality
wifi_utils_get_qual returns -1 on error. Keeping it in an unsigned variable is a bug. Error found by running Coverity https://bugzilla.redhat.com/show_bug.cgi?id=1025894 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/devices/nm-device-wifi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/nm-device-wifi.c b/src/devices/nm-device-wifi.c
index 6c19d6206e..1434485783 100644
--- a/src/devices/nm-device-wifi.c
+++ b/src/devices/nm-device-wifi.c
@@ -678,7 +678,8 @@ periodic_update (gpointer user_data)
NMDeviceWifi *self = NM_DEVICE_WIFI (user_data);
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
NMAccessPoint *new_ap;
- guint32 new_rate, percent;
+ guint32 new_rate;
+ int percent;
NMDeviceState state;
guint32 supplicant_state;