Code

starttls support for check_smtp #1041576
[nagiosplug.git] / plugins / check_load.c
index 00bfc8a6c083aa6bddc07e49ca0a26ab6b9f569e..7e1cc481e9d777b3662cf404c9f65c6322f9d6eb 100644 (file)
@@ -74,7 +74,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"));
 
 #if HAVE_GETLOADAVG==1
@@ -224,9 +224,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);
                }
        }
 
@@ -319,7 +317,5 @@ the load average format is the same used by \"uptime\" and \"w\"\n\n"));
 void
 print_usage (void)
 {
-       printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n"),
-               progname);
-       printf (UT_HLP_VRS, progname, progname);
+       printf ("Usage: %s -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname);
 }