Hi,

This patch makes the indent of cgroup_init() shallower for the readability.


Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <[email protected]>
---
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++;
                }
        }
 

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to