aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-04-26 08:43:25 (GMT)
committerJouni Malinen <j@w1.fi>2014-04-29 09:52:10 (GMT)
commit0bceb8d6f426d8cf413c5057f002f010af802e3f (patch)
tree4c8017c555dfd8cd3c6fea4233a54242840e37a9 /src/drivers
parent5f693cb1b66e58dc6d5f3cf9705eeef88d35ca05 (diff)
downloadhostap-0bceb8d6f426d8cf413c5057f002f010af802e3f.zip
hostap-0bceb8d6f426d8cf413c5057f002f010af802e3f.tar.gz
hostap-0bceb8d6f426d8cf413c5057f002f010af802e3f.tar.bz2
Make dl_list_first() and dl_list_last() uses easier for static analyzers
The previous check for dl_list_len() or having an entry from the list is sufficient, but some static analyzers cannot figure out that dl_list_first() and dl_list_last() will return non-NULL in this type of cases. Avoid invalid reports by explicitly checking for NULL. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/driver_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_test.c b/src/drivers/driver_test.c
index 1b13d3d..3608b52 100644
--- a/src/drivers/driver_test.c
+++ b/src/drivers/driver_test.c
@@ -1906,7 +1906,7 @@ static void wpa_driver_test_scan_cmd(struct wpa_driver_test_data *drv,
/* data: optional [ STA-addr | ' ' | IEs(hex) ] */
- if (!drv->ibss)
+ if (bss == NULL || !drv->ibss)
return;
pos = buf;