[PATCH 2/8] android/client: Add NELEM macro for count elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 647162c..dea7237 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, ...) \
 	{ \
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux