Make dl_list_first() and dl_list_last() uses easier for static analyzers
authorJouni Malinen <j@w1.fi>
Sat, 26 Apr 2014 08:43:25 +0000 (11:43 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
commit0bceb8d6f426d8cf413c5057f002f010af802e3f
tree4c8017c555dfd8cd3c6fea4233a54242840e37a9
parent5f693cb1b66e58dc6d5f3cf9705eeef88d35ca05
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>
src/drivers/driver_test.c
src/p2p/p2p.c
src/wps/wps_upnp_ssdp.c
src/wps/wps_upnp_web.c
wpa_supplicant/p2p_supplicant.c