From 464d9b64afeb5cfc4cd9fefc53d346702fe13344 Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Fri, 8 Nov 2013 13:48:24 +0100 Subject: [PATCH] android/client: Add NELEM macro for count elements NELEM macro will be used in several places. --- android/client/if-main.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/client/if-main.h b/android/client/if-main.h index 647162c6b..dea723766 100644 --- a/android/client/if-main.h +++ b/android/client/if-main.h @@ -144,6 +144,8 @@ struct method *get_command(const char *name); const struct method *get_interface_method(const char *iname, const char *mname); +#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0]))) + /* Helper macro for executing function on interface and printing BT_STATUS */ #define EXEC(f, ...) \ { \ -- 2.47.3