Re: [iproute PATCH v4] Use ARRAY_SIZE macro everywhere

2016-06-29 Thread Stephen Hemminger
On Tue, 28 Jun 2016 16:42:15 + 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 v4] Use ARRAY_SIZE macro everywhere

2016-06-28 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