]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
[Libcg-devel] [PATCH] BUGFIX: add missing braces
authorJan Safranek <jsafrane@redhat.com>
Mon, 10 Jan 2011 14:31:52 +0000 (15:31 +0100)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Mon, 10 Jan 2011 15:46:59 +0000 (21:16 +0530)
Fix cgclassify to return zero exit code when it succeeds.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
src/tools/cgclassify.c

index 31811058b7ede22783b8078c60f24ce19bc5826e..fcad4b293ab7046979b776be2167838aedde4001 100644 (file)
@@ -45,10 +45,11 @@ static int change_group_path(pid_t pid, struct cgroup_group_spec *cgroup_list[])
 
                ret = cgroup_change_cgroup_path(cgroup_list[i]->path, pid,
                                                 (const char*const*) cgroup_list[i]->controllers);
-               if (ret)
+               if (ret) {
                        fprintf(stderr, "Error changing group of pid %d: %s\n",
                                pid, cgroup_strerror(ret));
                        return -1;
+               }
        }
 
        return 0;