]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
config: use macros instead of arrays for const strings
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Mar 2010 20:03:24 +0000 (21:03 +0100)
committerDhaval Giani <dhaval.giani@gmail.com>
Fri, 26 Mar 2010 11:56:44 +0000 (12:56 +0100)
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
src/config.c

index 36fa11eab54bc5cb71094081f3328efb98ca2157..dfee471b608c3e87be80d2271cc7aec7245c2e92 100644 (file)
@@ -70,7 +70,7 @@ int cgroup_table_index;
 /*
  * Needed for the type while mounting cgroupfs.
  */
-static const char cgroup_filesystem[] = "cgroup";
+#define CGROUP_FILESYSTEM "cgroup"
 
 /*
  * NOTE: All these functions return 1 on success
@@ -413,7 +413,7 @@ int cgroup_config_mount_fs(void)
                        return ECGOTHER;
                }
 
-               ret = mount(cgroup_filesystem, curr->path, cgroup_filesystem,
+               ret = mount(CGROUP_FILESYSTEM, curr->path, CGROUP_FILESYSTEM,
                                                                0, curr->name);
 
                if (ret < 0)