aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-02-23 16:02:16 (GMT)
committerJouni Malinen <j@w1.fi>2019-02-25 17:48:49 (GMT)
commit5ac13f6d00acb7e80f3387b58923029a3ac412b9 (patch)
tree5382b798e4604df6aeeff6e7c5c36c3a51428051
parentaaa6b14984a038cf3b63172cb1f2231ab79d1471 (diff)
downloadhostap-5ac13f6d00acb7e80f3387b58923029a3ac412b9.zip
hostap-5ac13f6d00acb7e80f3387b58923029a3ac412b9.tar.gz
hostap-5ac13f6d00acb7e80f3387b58923029a3ac412b9.tar.bz2
atheros: Avoid clang compiler warning on address of array check
ie.wps_ie is an array, so there is no point in checking whether it is NULL. driver_atheros.c:1221:9: error: address of array 'ie.wps_ie' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/drivers/driver_atheros.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 62f5baa..807cd94 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -1218,8 +1218,7 @@ atheros_new_sta(struct atheros_driver_data *drv, u8 addr[IEEE80211_ADDR_LEN])
#ifdef ATH_WPS_IE
/* if WPS IE is present, preference is given to WPS */
- if (ie.wps_ie &&
- (ie.wps_ie[1] > 0 && (ie.wps_ie[0] == WLAN_EID_VENDOR_SPECIFIC))) {
+ if (ie.wps_ie[0] == WLAN_EID_VENDOR_SPECIFIC && ie.wps_ie[1] > 0) {
iebuf = ie.wps_ie;
ielen = ie.wps_ie[1];
}