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>
"namespaces",
"netns",
};
-static const int CONTROLLERS_CNT =
- sizeof(CONTROLLERS) / sizeof(CONTROLLERS[0]);
+static const int CONTROLLERS_CNT = ARRAY_SIZE(CONTROLLERS);
static cg_version_t VERSIONS[] = {
CGROUP_V1,
CGROUP_V1,
CGROUP_V2,
};
-static const int VERSIONS_CNT =
- sizeof(VERSIONS) / sizeof(VERSIONS[0]);
+static const int VERSIONS_CNT = ARRAY_SIZE(VERSIONS);
class CgroupCreateCgroupTest : public ::testing::Test {
protected: