X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_hpjd.c;h=dd49893b8f955011a3e26964bab39113d49f1ee6;hb=6ecaa524bf28b5fb861b161ea075a11119cb3bd2;hp=678d5c80c72c119acfde15f5b660dcc0b9e3b95c;hpb=5e3fc41c6143676cf01b7aad789fc5f2cae5ce84;p=nagiosplug.git diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 678d5c8..dd49893 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -85,7 +85,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != TRUE) + if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); /* removed ' 2>1' at end of command 10/27/1999 - EG */ @@ -286,7 +286,6 @@ main (int argc, char **argv) } - /* process command-line arguments */ int process_arguments (int argc, char **argv) @@ -334,9 +333,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_OK); case '?': /* help */ - printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); - print_usage (); - exit (STATE_UNKNOWN); + usage2 (_("Unknown argument"), optarg); } } @@ -361,7 +358,6 @@ process_arguments (int argc, char **argv) } - int validate_arguments (void) { @@ -369,7 +365,6 @@ validate_arguments (void) } - void print_help (void) { @@ -398,5 +393,5 @@ Net-snmp must be installed on the computer running the plugin.\n\n")); void print_usage (void) { - printf ("Usage: %s -H host [-C community]\n"), progname); + printf ("Usage: %s -H host [-C community]\n", progname); }