Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-28

Re: [iproute PATCH] Use ARRAY_SIZE macro everywhere

From: Stephen Hemminger <hidden>
Date: 2016-03-21 19:47:49

On Thu, 17 Mar 2016 20:28:08 +0100
Phil Sutter [off-list ref] 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[...]))
+ ARRAY_SIZE(E)
|
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
)

The only manual adjustment was to include utils.h in misc/nstat.c to make
the macro known there.

Signed-off-by: Phil Sutter <phil@nwl.cc>
I went ahead and did some checkpatch spring cleaning to code.
This is no longer needed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help