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

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


keestux commented on this pull request.



> @@ -53,7 +53,7 @@ static kernel_pid_t _tftp_kernel_pid;
 #endif
 
 #define MIN(a, b)                   ((a) > (b) ? (b) : (a))
-#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-264527473
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190721/d7542065/attachment.htm>


More information about the notifications mailing list