Move to using the POSIX standard codes EXIT_FAILURE/EXIT_SUCCESS instead of explicit numbers.
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugectl.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hugectl.c b/hugectl.c index 10e8806..d9b7040 100644 --- a/hugectl.c +++ b/hugectl.c @@ -60,11 +60,15 @@ int main(int argc, char** argv) ret = getopt_long(argc, argv, opts, long_opts, &index); switch (ret) { case '?': + print_usage(); + exit(EXIT_FAILURE); + case 'h': print_usage(); - exit(1); + exit(EXIT_SUCCESS); default: + fprintf(stderr, "unparsed option %08x\n", ret); ret = -1; break; } @@ -73,10 +77,10 @@ int main(int argc, char** argv) if ((argc - index) < 1) { print_usage(); - exit(1); + exit(EXIT_FAILURE); } execvp(argv[index], &argv[index]); fprintf(stderr, "Error calling execvp: '%s'\n", strerror(errno)); - exit(1); + exit(EXIT_FAILURE); } -- 1.5.6.GIT ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel