Use ARRAY_SIZE() macro to calculate the length of the array, across the
file.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
"test3-ctrlrenabled",
"test4-ctrlrdisabled",
};
-static const int CHILD_DIRS_CNT =
- sizeof(CHILD_DIRS) / sizeof(CHILD_DIRS[0]);
+static const int CHILD_DIRS_CNT = ARRAY_SIZE(CHILD_DIRS);
static const char * const CONTROLLERS[] = {
"cpu",
"net_cls",
"pids",
};
-static const int CONTROLLERS_CNT =
- sizeof(CONTROLLERS) / sizeof(CONTROLLERS[0]);
+static const int CONTROLLERS_CNT = ARRAY_SIZE(CONTROLLERS);
static const enum cg_version_t VERSIONS[] = {
CGROUP_V2,