orangefs: use ARRAY_SIZE
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Sun, 1 Oct 2017 19:30:48 +0000 (15:30 -0400)
committerMike Marshall <hubcap@omnibond.com>
Mon, 13 Nov 2017 20:09:58 +0000 (15:09 -0500)
commit296200d3bb649f9646f60abe6e8ebb9fd8d20f4b
treed47aaf3f3608f15a4d2f747e3bf13d82b7d5454d
parent933f7ac1a1df37ab6b25b50a85c13fcc5ea8cd03
orangefs: use ARRAY_SIZE

Using the ARRAY_SIZE macro improves the readability of the code.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-debug.h
fs/orangefs/orangefs-utils.c