From 955f800dacc53a40d053d4d33cb15dd962ce3b97 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Tue, 8 Aug 2023 16:26:45 +0530 Subject: [PATCH] gunit/008: use ARRAY_SIZE() macro Use ARRAY_SIZE() macro to calculate the length of the array, across the file. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- tests/gunit/008-cgroup_process_v2_mount.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/gunit/008-cgroup_process_v2_mount.cpp b/tests/gunit/008-cgroup_process_v2_mount.cpp index a68c8ed7..f69fd35d 100644 --- a/tests/gunit/008-cgroup_process_v2_mount.cpp +++ b/tests/gunit/008-cgroup_process_v2_mount.cpp @@ -24,8 +24,7 @@ static const char * const CONTROLLERS[] = { "pids", "rdma", }; -static const int CONTROLLERS_CNT = - sizeof(CONTROLLERS) / sizeof(CONTROLLERS[0]); +static const int CONTROLLERS_CNT = ARRAY_SIZE(CONTROLLERS); static int mnt_tbl_idx = 0; -- 2.47.2