From db49d083639fca1d2e80e951b1de04fb14fe3421 Mon Sep 17 00:00:00 2001 From: Ivana Hutarova Varekova Date: Thu, 26 Sep 2013 11:53:33 +0200 Subject: [PATCH] cgclassify: polish usage function This change is suggested by Dhaval Giani . Polish "usage function and remove a level of indentation. Signed-off-by: Ivana Hutarova Varekova Acked-by: Jan Safranek Acked-by: Dhaval Giani --- src/tools/cgclassify.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/tools/cgclassify.c b/src/tools/cgclassify.c index 2f80aca3..bb54424e 100644 --- a/src/tools/cgclassify.c +++ b/src/tools/cgclassify.c @@ -37,19 +37,17 @@ static void usage(int status, const char *program_name) fprintf(stderr, "Wrong input parameters," " try %s -h' for more information.\n", program_name); - } else { - printf("Usage: %s"\ - "[-g :]" - "[--sticky | --cancel-sticky] \n", - program_name); - printf("Move running task(s) to given cgroups\n"); - printf(" -g : Control group "\ - "to be displayed (-g is optional)\n"); - printf(" --sticky cgred daemon "\ - "does not change pidlist and children tasks\n"); - printf(" --cancel-sticky cgred daemon "\ - "change pidlist and children tasks\n"); + return; } + printf("Usage: %s [-g :] "\ + "[--sticky | --cancel-sticky] \n", program_name); + printf("Move running task(s) to given cgroups\n"); + printf(" -g : Control group to be displayed "\ + "(-g is optional)\n"); + printf(" --sticky cgred daemon does not change "\ + "pidlist and children tasks\n"); + printf(" --cancel-sticky cgred daemon change pidlist "\ + "and children tasks\n"); } /* -- 2.47.2