diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-12 22:29:43 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-12 22:29:43 +0000 |
commit | 62d749fb64f33043f3c4a612fb49df13bcf0dd74 (patch) | |
tree | cefc7b9a6006f4b712388163c0a2880853245215 /plugins/negate.c | |
parent | 80da8e6dab2b37abc491018b2894414b80cfcbf4 (diff) | |
download | monitoring-plugins-62d749fb64f33043f3c4a612fb49df13bcf0dd74.tar.gz |
Remove unnecessary \ and fix coredump with no parameters specified
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@322 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/negate.c')
-rw-r--r-- | plugins/negate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/negate.c b/plugins/negate.c index 454ac963..e10c78df 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -31,7 +31,7 @@ const char *progname = "negate"; #define SUMMARY "Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n" #define OPTIONS "\ -\[-t timeout] <definition of wrapped plugin>" +[-t timeout] <definition of wrapped plugin>" #define LONGOPTIONS "\ -t, --timeout=INTEGER\n\ @@ -117,7 +117,7 @@ main (int argc, char **argv) char input_buffer[MAX_INPUT_BUFFER]; if (process_arguments (argc, argv) == ERROR) - usage ("Could not parse arguments"); + usage ("Could not parse arguments\n"); /* Set signal handling and alarm */ if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR) @@ -282,6 +282,8 @@ process_arguments (int argc, char **argv) int validate_arguments () { + if (command_line == NULL) + return ERROR; return STATE_OK; } |