Code

Fix parsing for netkit-ping and iputils-ping (Christian G Warden)
[nagiosplug.git] / plugins / negate.c
index e0f997501fc3f8d038694458898e1f56a1acb94e..d08c3a309e30b868cd6dc7a51c0655d48797c5ee 100644 (file)
@@ -83,7 +83,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"));
 
        /* Set signal handling and alarm */
@@ -174,9 +174,7 @@ process_arguments (int argc, char **argv)
 
                switch (c) {
                case '?':     /* help */
-                       printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
-                       print_usage ();
-                       exit (STATE_UNKNOWN);
+                       usage2 (_("Unknown argument"), optarg);
                        break;
                case 'h':     /* help */
                        print_help ();
@@ -239,11 +237,10 @@ print_help (void)
 {
        print_revision (progname, revision);
 
-       printf (_(COPYRIGHT), copyright, email);
+       printf (COPYRIGHT, copyright, email);
 
        printf (_("\
-Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n\
-\n"));
+Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n\n"));
 
        print_usage ();
 
@@ -274,7 +271,5 @@ Otherwise, the output state of the wrapped plugin is unchanged.\n"));
 void
 print_usage (void)
 {
-       printf (_("Usage: %s [-t timeout] <definition of wrapped plugin>\n"),
-               progname);
-       printf (_(UT_HLP_VRS), progname, progname);
+       printf ("Usage: %s [-t timeout] <definition of wrapped plugin>\n",progname);
 }