]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
gunit/012: replace controller name size definition
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 6 May 2022 15:34:10 +0000 (21:04 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 16 May 2022 16:06:32 +0000 (10:06 -0600)
Replace the struct cg_mount_table::name size definition FILENAME_MAX
with CONTROL_NAMELEN_MAX.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
gunit/012-cgroup_create_cgroup.cpp

index cb26ca74a89f25dc31d3866d7baffbf5f0374fc5..dbe7c5342814489d464ff491dd4503caebb42833 100644 (file)
@@ -59,7 +59,7 @@ class CgroupCreateCgroupTest : public ::testing::Test {
                memset(&cg_namespace_table, 0, sizeof(cg_namespace_table));
 
                for (i = 0; i < CONTROLLERS_CNT; i++) {
-                       snprintf(cg_mount_table[i].name, FILENAME_MAX,
+                       snprintf(cg_mount_table[i].name, CONTROL_NAMELEN_MAX,
                                 "%s", CONTROLLERS[i]);
                        cg_mount_table[i].version = VERSIONS[i];