From: Kamalesh Babulal Date: Tue, 8 Aug 2023 10:56:45 +0000 (+0530) Subject: gunit/008: use ARRAY_SIZE() macro X-Git-Tag: v3.2.0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=955f800dacc53a40d053d4d33cb15dd962ce3b97;p=thirdparty%2Flibcgroup.git 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 --- 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;