Use the ARRAY_LENGTH() macro when possible
authorAndrea Canciani <ranma42@gmail.com>
Thu, 3 Nov 2011 09:51:27 +0000 (10:51 +0100)
committerAndrea Canciani <ranma42@gmail.com>
Wed, 9 Nov 2011 08:17:00 +0000 (09:17 +0100)
commit97b9fa090c54f6feab54bde272df374a13c0c84d
tree11237ac2a8e3d14928f99252c6ed919d1ee9ae71
parent06760f5cb069bdc041af7a0e73c9d5fc08741f28
Use the ARRAY_LENGTH() macro when possible

This patch has been generated by the following Coccinelle semantic patch:

// Use the ARRAY_LENGTH() macro when possible
//
// Replace open-coded array length computations with the
// ARRAY_LENGTH() macro

@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_LENGTH (E)
test/blitters-test.c
test/fetch-test.c
test/gradient-crash-test.c
test/lowlevel-blt-bench.c
test/oob-test.c
test/trap-crasher.c