[riot-notifications] [RIOT-OS/RIOT] add ARRAYSIZE macro and make use of it (#11865)

Kees Bakker notifications at github.com
Sun Jul 21 11:11:53 CEST 2019


keestux commented on this pull request.



> @@ -47,7 +47,7 @@
 /**
  * @brief   Determine length of array in elements
  */
-#define _ARRAY_LEN(x)                   (sizeof(x) / sizeof(x[0]))
+#define _ARRAY_LEN(x)                   ARRAY_SIZE(x)

Why not remove `_ARRAY_LEN` and replace its use with `ARRAY_SIZE`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11865#pullrequestreview-264527380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190721/3bcc99f6/attachment-0001.htm>


More information about the notifications mailing list