From: Dhaval Giani Date: Fri, 26 Mar 2010 14:04:36 +0000 (+0100) Subject: libcgroup: Fix coding style issues in config.c X-Git-Tag: v0.36~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d9cfa810c30ffa5e2e5a6d1f289f95ad23354a5;p=thirdparty%2Flibcgroup.git libcgroup: Fix coding style issues in config.c 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 --- diff --git a/src/config.c b/src/config.c index 98eace31..a27a4d63 100644 --- a/src/config.c +++ b/src/config.c @@ -13,10 +13,10 @@ * 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