From 9842d2507fa19cdf7d0bfd76df73609d14473b49 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 8 May 2015 13:21:16 +0200 Subject: [PATCH] iwinfo: move ARRAY_SIZE macro to iwinfo/utils.h Signed-off-by: Jo-Philipp Wich --- include/iwinfo/utils.h | 4 ++++ iwinfo_lib.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) 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, -- 2.25.1