]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Fix coding style issues in config.c
authorDhaval Giani <dhaval.giani@gmail.com>
Fri, 26 Mar 2010 14:04:36 +0000 (15:04 +0100)
committerDhaval Giani <dhaval.giani@gmail.com>
Fri, 26 Mar 2010 14:10:42 +0000 (15:10 +0100)
Pre:
total: 1 errors, 10 warnings, 817 lines checked

Post:
total: 0 errors, 4 warnings, 818 lines checked

Unfixed warnings are because they break text and therefore capabilities
to easily grep through.

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
src/config.c

index 98eace31dcb6c4518a76f36a31991f1c0ebf6395..a27a4d63bcbff6f458abd5f7173f6f713ac61828 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
  * TODOs:
- *     1. Implement our own hashing scheme
- *     2. Add namespace support
- *     3. Add support for parsing cgroup filesystem and creating a
- *        config out of it.
+ *     1. Implement our own hashing scheme
+ *     2. Add namespace support
+ *     3. Add support for parsing cgroup filesystem and creating a
+ *        config out of it.
  *
  * Code initiated and designed by Balbir Singh. All faults are most likely
  * his mistake.
@@ -532,7 +532,8 @@ static int config_validate_namespaces(void)
                 * Search through the mount table to locate which subsystems
                 * are mounted together.
                 */
-               while (!strncmp(cg_mount_table[j].path, mount_path, FILENAME_MAX)) {
+               while (!strncmp(cg_mount_table[j].path, mount_path,
+                                                       FILENAME_MAX)) {
                        if (!namespace && cg_namespace_table[j]) {
                                /* In case namespace is not setup, set it up */
                                namespace = cg_namespace_table[j];
@@ -569,8 +570,7 @@ static int config_validate_namespaces(void)
                                        error = ECGOTHER;
                                        goto out_error;
                                }
-                       }
-                       else if (strcmp(namespace, cg_namespace_table[j])) {
+                       } else if (strcmp(namespace, cg_namespace_table[j])) {
                                error = ECGNAMESPACEPATHS;
                                goto out_error;
                        }
@@ -608,7 +608,8 @@ static int config_order_namespace_table(void)
        for (i = 0; i < CG_CONTROLLER_MAX; i++)
                cg_namespace_table[i] = NULL;
 
-       memset(cg_namespace_table, 0, CG_CONTROLLER_MAX * sizeof(cg_namespace_table[0]));
+       memset(cg_namespace_table, 0,
+                       CG_CONTROLLER_MAX * sizeof(cg_namespace_table[0]));
 
        /*
         * Now fill up the namespace table looking at the table we have