aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-06-03 18:08:48 +0300
committerJouni Malinen <j@w1.fi>2008-06-03 18:08:48 +0300
commita8e16edc8638d18b972e2b053d17b54167ce5aa5 (patch)
tree263bc8ddfe1b80a718d1f41ccc43d72e9569947b /src/utils
parent957ed801e9261c051c2ca1bbc5a051ff38e11fde (diff)
downloadexternal_wpa_supplicant_8_ti-a8e16edc8638d18b972e2b053d17b54167ce5aa5.zip
external_wpa_supplicant_8_ti-a8e16edc8638d18b972e2b053d17b54167ce5aa5.tar.gz
external_wpa_supplicant_8_ti-a8e16edc8638d18b972e2b053d17b54167ce5aa5.tar.bz2
Introduced new helper function is_zero_ether_addr()
Use this inline function to replace os_memcmp(addr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) == 0.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/common.h b/src/utils/common.h
index d495a2e..d0a2eb3 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -428,6 +428,10 @@ TCHAR * wpa_strdup_tchar(const char *str);
const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
+static inline int is_zero_ether_addr(const u8 *a)
+{
+ return !(a[0] | a[1] | a[2] | a[3] | a[4] | a[5]);
+}
#include "wpa_debug.h"