]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgexec: polish usage function
authorIvana Hutarova Varekova <varekova@redhat.com>
Fri, 27 Sep 2013 05:10:21 +0000 (07:10 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Fri, 27 Sep 2013 05:10:21 +0000 (07:10 +0200)
This change is suggested by Dhaval Giani <dhaval.giani@gmail.com>.
Polish "usage" function of cgexec tool. Remove a level of
indentation.

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Acked-by: Jan Safranek <jsafrane@redhat.com>
src/tools/cgexec.c

index 30725b3f5c5f31e10be8a980f24e67b89f2f4f00..a6b8e4f665a9ac1ac2af8a488ee7e88d11d2348c 100644 (file)
@@ -42,20 +42,19 @@ static struct option longopts[] = {
 
 static void usage(int status, const char *program_name)
 {
-       if (status != 0)
+       if (status != 0) {
                fprintf(stderr, "Wrong input parameters,"
                        " try %s --help' for more information.\n",
                        program_name);
-       else {
-               printf("Usage: %s [-h] [-g <controllers>:<path>] "
-                       "[--sticky] command [arguments] ...\n",
-                       program_name);
-               printf("Run the task in given control groups\n");
-               printf("  -g <controllers>:<path>       Control "\
-                       "group which should be added\n");
-               printf("  --sticky                      cgred "\
-                       "daemon does not change pidlist and children tasks\n");
+               return;
        }
+       printf("Usage: %s [-h] [-g <controllers>:<path>] [--sticky] "\
+               "command [arguments] ...\n", program_name);
+       printf("Run the task in given control group(s)\n");
+       printf("  -g <controllers>:<path>       Control group which "\
+               "should be added\n");
+       printf("  --sticky                      cgred daemon does not "\
+               "change pidlist and children tasks\n");
 }