[riot-notifications] [RIOT-OS/RIOT] sys/ps: Improve robustness against string table errors. (#10977)

Juan I Carrano notifications at github.com
Mon Feb 25 14:42:57 CET 2019

jcarrano commented on this pull request.

> @@ -43,6 +43,28 @@ static const char *state_names[] = {
     [STATUS_COND_BLOCKED] = "bl cond",
+#define STATE_NAMES_NUMOF ((int)(sizeof(state_names)/sizeof(state_names[0])))

@maribu I agree with the first comment. The second suggestion would be good, too, but _Static_assert is C11 and afaik we try to keep riot in c99 (even if we use some GCC extension like in the initialization of state_names)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190225/32edc082/attachment-0001.html>

More information about the notifications mailing list