Skip to contentSkip to conversation

kernel/mq_open: use ARRAY_SIZE

PATCH New Maninder Singh 1 participant 1 message Jul 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 5/13 kernel/mq_open: use ARRAY_SIZE

use ARRAY_SIZE instead of sizeof(a)/sizeof(a[0])

---
 testcases/kernel/syscalls/mq_open/mq_open01.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/kernel/syscalls/mq_open/mq_open01.c +1 -2
index 3c2d1b1..529dd7a 100644
@@ -405,8 +405,7 @@ int main(int ac, char **av)
 			/*
 			 * Execute test
 			 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
-			     i++) {
+			for (i = 0; i < (int)ARRAY_SIZE(tcase); i++) {
 				int ret;
 				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
Signature · 11 lines
1.7.9.5
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list