Code

starttls support for check_smtp #1041576
[nagiosplug.git] / plugins / check_hpjd.c
index 816ce19bc8e4c9682831fe879ff1a322c0b431a1..dd49893b8f955011a3e26964bab39113d49f1ee6 100644 (file)
@@ -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,6 +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);
 }