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

index 4445048bc55eb0e3ba350c59c24aee55691acfa0..d5392cdcc5f7406c0b9f113a384fe9afe14c473e 100644 (file)
@@ -44,7 +44,7 @@ class BuildTasksProcPathTest : public ::testing::Test {
 
                // Populate the mount table
                for (i = 0; i < ENTRY_CNT; i++) {
-                       snprintf(cg_mount_table[i].name, FILENAME_MAX,
+                       snprintf(cg_mount_table[i].name, CONTROL_NAMELEN_MAX,
                                 "controller%d", i);
                        cg_mount_table[i].index = i;