about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-11-17 20:00:17 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-11-17 20:00:17 +0000
commit7a17a1f9b07ee1df3a0f8f08850c207a3cdc3479 (patch)
treede906bfa58cb8d836e12fafb599949b0f9777f46 /src
parentec17a98d42d8f90d8cbefb01943562a63f2e74d5 (diff)
downloadbcnm-7a17a1f9b07ee1df3a0f8f08850c207a3cdc3479.tar.gz
bcnm-7a17a1f9b07ee1df3a0f8f08850c207a3cdc3479.tar.xz
bcnm-7a17a1f9b07ee1df3a0f8f08850c207a3cdc3479.zip
signal_level should be signed
Diffstat (limited to 'src')
-rw-r--r--src/include/bcnm/wpactrl.h2
-rw-r--r--src/libwpactrl/wpactrl_scan_parse.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/bcnm/wpactrl.h b/src/include/bcnm/wpactrl.h
index a81385e..5602037 100644
--- a/src/include/bcnm/wpactrl.h
+++ b/src/include/bcnm/wpactrl.h
@@ -91,7 +91,7 @@ struct wpactrl_scanres_s
 {
   char bssid[6] ;
   uint32_t frequency ;
-  uint32_t signal_level ;
+  int32_t signal_level ;
   size_t flags_start ;
   size_t flags_len ;
   size_t ssid_start ;
diff --git a/src/libwpactrl/wpactrl_scan_parse.c b/src/libwpactrl/wpactrl_scan_parse.c
index e75072d..decb1cb 100644
--- a/src/libwpactrl/wpactrl_scan_parse.c
+++ b/src/libwpactrl/wpactrl_scan_parse.c
@@ -24,7 +24,7 @@ static int wpactrl_scan_parse_one (char const *s, size_t len, wpactrl_scanres_t
   s += pos + 1 ; len -= pos + 1 ;
   pos = byte_chr(s, len, '\t') ;
   if (pos >= len) goto eproto ;
-  if (uint32_scan(s, &sr.signal_level) != pos) goto eproto ;
+  if (int32_scan(s, &sr.signal_level) != pos) goto eproto ;
   s += pos + 1 ; len -= pos + 1 ;
   pos = byte_chr(s, len, '\t') ;
   if (pos >= len) goto eproto ;