summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2009-05-13 13:27:57 +0900
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-05-18 13:44:40 +0530
commit54a346f0934c5ce64dc5f97e8b47ad92ae371845 (patch)
treea134fd1e4ab2bedc46dbe571382f6e180965ae23
parent28cb29c0869eb5a3828397952b464b6f8a2bb365 (diff)
downloadlibcg-54a346f0934c5ce64dc5f97e8b47ad92ae371845.tar.gz
libcg-54a346f0934c5ce64dc5f97e8b47ad92ae371845.tar.xz
libcg-54a346f0934c5ce64dc5f97e8b47ad92ae371845.zip
Cleanup: make the indent of cgroup_init()shallower.
Hi, This patch makes the indent of cgroup_init() shallower for the readability. Thanks Ken'ichi Ohmichi Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
-rw-r--r--src/api.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/api.c b/src/api.c
index 4902c45..4f88d20 100644
--- a/src/api.c
+++ b/src/api.c
@@ -633,28 +633,26 @@ int cgroup_init()
while ((ent = getmntent_r(proc_mount, temp_ent,
mntent_buffer,
sizeof(mntent_buffer))) != NULL) {
- if (!strcmp(ent->mnt_type, "cgroup")) {
- for (i = 0; controllers[i] != NULL; i++) {
- mntopt = hasmntopt(ent, controllers[i]);
-
- if (!mntopt)
- continue;
-
- mntopt = strtok_r(mntopt, ",", &strtok_buffer);
-
- if (strcmp(mntopt, controllers[i]) == 0) {
- cgroup_dbg("matched %s:%s\n", mntopt,
- controllers[i]);
- strcpy(cg_mount_table[found_mnt].name,
- controllers[i]);
- strcpy(cg_mount_table[found_mnt].path,
- ent->mnt_dir);
- cgroup_dbg("Found cgroup option %s, "
- " count %d\n",
- ent->mnt_opts, found_mnt);
- found_mnt++;
- }
- }
+ if (strcmp(ent->mnt_type, "cgroup"))
+ continue;
+
+ for (i = 0; controllers[i] != NULL; i++) {
+ mntopt = hasmntopt(ent, controllers[i]);
+
+ if (!mntopt)
+ continue;
+
+ mntopt = strtok_r(mntopt, ",", &strtok_buffer);
+
+ if (strcmp(mntopt, controllers[i]))
+ continue;
+
+ cgroup_dbg("matched %s:%s\n", mntopt, controllers[i]);
+ strcpy(cg_mount_table[found_mnt].name, controllers[i]);
+ strcpy(cg_mount_table[found_mnt].path, ent->mnt_dir);
+ cgroup_dbg("Found cgroup option %s, count %d\n",
+ ent->mnt_opts, found_mnt);
+ found_mnt++;
}
}