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

Signed-off-by: Maninder Singh <[email protected]>
---
 testcases/kernel/syscalls/mq_open/mq_open01.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c 
b/testcases/kernel/syscalls/mq_open/mq_open01.c
index 3c2d1b1..529dd7a 100644
--- a/testcases/kernel/syscalls/mq_open/mq_open01.c
+++ b/testcases/kernel/syscalls/mq_open/mq_open01.c
@@ -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]);
-- 
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

Reply via email to