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;
                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

Reply via email to