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

Kees Bakker notifications at github.com
Sun Jul 21 23:03:26 CEST 2019

Notice that your sed command can be improved a bit.
-  the spaces around the divide should be optional
-  the space does not need an escape
-  it's safer to match for non-`)` and have at least one character in the first sizeof, hence the `[^)]+`

Try this and you'll have more hits, for example in `drivers/ltc4150/ltc4150_last_minute.c` and `sys/auto_init/netif/auto_init_cc110x.c`. But there are more.

sed -ri 's/sizeof\(([^)]+)\) ?\/ ?sizeof\(\1\[0\]\)/ARRAYSIZE\(\1\)/g'

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/20190721/1ad15e51/attachment.htm>

More information about the notifications mailing list