From: Ivana Hutarova Varekova Date: Fri, 27 Sep 2013 05:10:21 +0000 (+0200) Subject: cgexec: polish usage function X-Git-Tag: v0.41~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c921df53c74e1682d9802c19ad030a70079cc6;p=thirdparty%2Flibcgroup.git cgexec: polish usage function This change is suggested by Dhaval Giani . Polish "usage" function of cgexec tool. Remove a level of indentation. Signed-off-by: Ivana Hutarova Varekova Acked-by: Dhaval Giani Acked-by: Jan Safranek --- diff --git a/src/tools/cgexec.c b/src/tools/cgexec.c index 30725b3f..a6b8e4f6 100644 --- a/src/tools/cgexec.c +++ b/src/tools/cgexec.c @@ -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 :] " - "[--sticky] command [arguments] ...\n", - program_name); - printf("Run the task in given control groups\n"); - printf(" -g : 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 :] [--sticky] "\ + "command [arguments] ...\n", program_name); + printf("Run the task in given control group(s)\n"); + printf(" -g : Control group which "\ + "should be added\n"); + printf(" --sticky cgred daemon does not "\ + "change pidlist and children tasks\n"); }