----- Original Message -----
> From: "Libo Chen" <[email protected]>
> To: "Ivana Hutarova Varekova" <[email protected]>
> Cc: "Libcg Development list" <[email protected]>, "Li Zefan"
> <[email protected]>, "Huang Qiang"
> <[email protected]>, "Wengmeiling" <[email protected]>
> 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 <[email protected]>
> ---
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel