----- Original Message ----- > From: "Libo Chen" <clbchenlibo.c...@huawei.com> > To: "Ivana Hutarova Varekova" <varek...@redhat.com> > Cc: "Libcg Development list" <libcg-devel@lists.sourceforge.net>, "Li Zefan" > <lize...@huawei.com>, "Huang Qiang" > <h.huangqi...@huawei.com>, "Wengmeiling" <wengmeiling.w...@huawei.com> > Sent: Friday, August 30, 2013 5:05:23 AM > Subject: [PATCH v2 3/5] cgconfig: -h or default para was seted then go out > > > when -h or default parameter was seted we could go out immediately. > > Signed-off-by: Libo Chen <clbchenlibo.c...@huawei.com> > --- > src/tools/cgconfig.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c > index fbb05ac..b205d1b 100644 > --- a/src/tools/cgconfig.c > +++ b/src/tools/cgconfig.c > @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) > switch (c) { > case 'h': > usage(argv[0]); > - break; > + goto err;
function usage ends by exit, thus there should be change in usage function as well. Ideally it should have a structure like usage function in the other tools (input parameter status which switch help/error output). There should not be used "exit" as well. > case 'l': > ret = cgroup_string_list_add_item(&cfg_files, optarg); > if (ret) { > @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) > break; > default: > usage(argv[0]); > - break; > + goto err; > } > } > > -- > 1.7.1 > > ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel