From: Jo-Philipp Wich Date: Fri, 8 May 2015 11:21:16 +0000 (+0200) Subject: iwinfo: move ARRAY_SIZE macro to iwinfo/utils.h X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9842d2507fa19cdf7d0bfd76df73609d14473b49;p=oweals%2Fiwinfo.git iwinfo: move ARRAY_SIZE macro to iwinfo/utils.h Signed-off-by: Jo-Philipp Wich --- diff --git a/include/iwinfo/utils.h b/include/iwinfo/utils.h index d4f32e4..95f9238 100644 --- a/include/iwinfo/utils.h +++ b/include/iwinfo/utils.h @@ -25,6 +25,10 @@ #include "iwinfo.h" +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#endif + #define LOG10_MAGIC 1.25892541179 extern struct uci_context *uci_ctx; diff --git a/iwinfo_lib.c b/iwinfo_lib.c index c30d834..0ab7be0 100644 --- a/iwinfo_lib.c +++ b/iwinfo_lib.c @@ -313,10 +313,6 @@ const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[] = { { 0, "" } }; -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif - static const struct iwinfo_ops *backends[] = { #ifdef USE_NL80211 &nl80211_ops,