diff --git a/plugins/check_vsz.c b/plugins/check_vsz.c
index 767abf4fd6d4d3be28dfaeaebad1cb72e879210c..7a9acb2dfea05021b6fa639f56a90f5bdfe7264e 100644 (file)
--- a/plugins/check_vsz.c
+++ b/plugins/check_vsz.c
char proc_name[MAX_INPUT_BUFFER];
char *message = "";
- if (!process_arguments (argc, argv)) {
+ if (process_arguments (argc, argv) == ERROR) {
printf ("%s: failure parsing arguments\n", progname);
print_help (progname);
return STATE_UNKNOWN;
{
int c;
-#ifdef HAVE_GETOPT_H
int option_index = 0;
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"command", required_argument, 0, 'C'},
{0, 0, 0, 0}
};
-#endif
if (argc < 2)
return ERROR;
while (1) {
-#ifdef HAVE_GETOPT_H
c = getopt_long (argc, argv, "+hVc:w:C:", long_options, &option_index);
-#else
- c = getopt (argc, argv, "+hVc:w:C:");
-#endif
+
if (c == EOF)
break;
switch (c) {
case '?': /* help */
- printf ("%s: Unknown argument: %s\n\n", progname, optarg);
print_usage (progname);
exit (STATE_UNKNOWN);
case 'h': /* help */