Re: [iproute PATCH v3] Use ARRAY_SIZE macro everywhere

2016-03-27 Thread Stephen Hemminger
On Tue, 22 Mar 2016 16:52:53 +0100 Phil Sutter wrote: > This patch was generated by the following semantic patch (a trimmed down > version of what is shipped with Linux sources): > > @@ > type T; > T[] E; > @@ > ( > - (sizeof(E)/sizeof(*E)) > + ARRAY_SIZE(E) > | > - (sizeof(E)/sizeof(E[...])) >

[iproute PATCH v3] Use ARRAY_SIZE macro everywhere

2016-03-22 Thread Phil Sutter
This patch was generated by the following semantic patch (a trimmed down version of what is shipped with Linux sources): @@ type T; T[] E; @@ ( - (sizeof(E)/sizeof(*E)) + ARRAY_SIZE(E) | - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) | - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) ) The only manual adjus