summaryrefslogtreecommitdiffstats
path: root/plugins/check_dummy.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_dummy.c')
-rw-r--r--plugins/check_dummy.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c
index 19f6c046..602d5868 100644
--- a/plugins/check_dummy.c
+++ b/plugins/check_dummy.c
@@ -45,18 +45,19 @@ int main(int argc, char **argv) {
45 bindtextdomain(PACKAGE, LOCALEDIR); 45 bindtextdomain(PACKAGE, LOCALEDIR);
46 textdomain(PACKAGE); 46 textdomain(PACKAGE);
47 47
48 if (argc < 2) 48 if (argc < 2) {
49 usage4(_("Could not parse arguments")); 49 usage4(_("Could not parse arguments"));
50 else if (strcmp(argv[1], "-V") == 0 || strcmp(argv[1], "--version") == 0) { 50 } else if (strcmp(argv[1], "-V") == 0 || strcmp(argv[1], "--version") == 0) {
51 print_revision(progname, NP_VERSION); 51 print_revision(progname, NP_VERSION);
52 exit(STATE_UNKNOWN); 52 exit(STATE_UNKNOWN);
53 } else if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { 53 } else if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
54 print_help(); 54 print_help();
55 exit(STATE_UNKNOWN); 55 exit(STATE_UNKNOWN);
56 } else if (!is_integer(argv[1])) 56 } else if (!is_integer(argv[1])) {
57 usage4(_("Arguments to check_dummy must be an integer")); 57 usage4(_("Arguments to check_dummy must be an integer"));
58 else 58 } else {
59 result = atoi(argv[1]); 59 result = atoi(argv[1]);
60 }
60 61
61 switch (result) { 62 switch (result) {
62 case STATE_OK: 63 case STATE_OK:
@@ -78,8 +79,9 @@ int main(int argc, char **argv) {
78 return STATE_UNKNOWN; 79 return STATE_UNKNOWN;
79 } 80 }
80 81
81 if (argc >= 3) 82 if (argc >= 3) {
82 printf(": %s", argv[2]); 83 printf(": %s", argv[2]);
84 }
83 85
84 printf("\n"); 86 printf("\n");
85 87
@@ -92,7 +94,8 @@ void print_help(void) {
92 printf("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n"); 94 printf("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
93 printf(COPYRIGHT, copyright, email); 95 printf(COPYRIGHT, copyright, email);
94 96
95 printf("%s\n", _("This plugin will simply return the state corresponding to the numeric value")); 97 printf("%s\n",
98 _("This plugin will simply return the state corresponding to the numeric value"));
96 99
97 printf("%s\n", _("of the <state> argument with optional text")); 100 printf("%s\n", _("of the <state> argument with optional text"));
98 101