Fix return code to 0 on success and 1 on error
authorDavid Goulet <david.goulet@polymtl.ca>
Sun, 17 Jul 2011 17:04:14 +0000 (13:04 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Sun, 17 Jul 2011 17:04:14 +0000 (13:04 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
lttng/lttng.c

index 7c0abfaf211fd42ef309f9bf0eaa47e1ff329a61..77006bc7f63ab11834bb3b6286e8d69f7af58f55 100644 (file)
@@ -431,13 +431,13 @@ static int parse_args(int argc, char **argv)
        if (ret < 0) {
                if (ret == -1) {
                        usage(stderr);
-                       goto error;
                } else {
                        ERR("%s", lttng_get_readable_code(ret));
                }
+               goto error;
        }
 
-       return ret;
+       return 0;
 
 error:
        return -1;
@@ -464,7 +464,9 @@ int main(int argc, char *argv[])
        }
 
        ret = parse_args(argc, argv);
-       clean_exit(ret);
+       if (ret < 0) {
+               clean_exit(EXIT_FAILURE);
+       }
 
        return 0;
 }
This page took 0.027087 seconds and 4 git commands to generate.