]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
gunit/015: replace controller name size definition
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 6 May 2022 15:34:17 +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/015-cgroupv2_controller_enabled.cpp

index 8dd8da69715b20fe790385b12a4dd92981f2d521..f5ad47c2fde66dd34c3c71fdee246d13a1a2c8c4 100644 (file)
@@ -87,7 +87,7 @@ class CgroupV2ControllerEnabled : 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]);
                        snprintf(cg_mount_table[i].mount.path, FILENAME_MAX,
                                 "%s", PARENT_DIR);