summaryrefslogtreecommitdiffstats
path: root/plugins/check_procs.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r--plugins/check_procs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 1894b28..5313b97 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -278,8 +278,8 @@ process_arguments (int argc, char **argv)
278 int c = 1; 278 int c = 1;
279 char *user; 279 char *user;
280 struct passwd *pw; 280 struct passwd *pw;
281 int option_index = 0; 281 int option = 0;
282 static struct option long_options[] = { 282 static struct option longopts[] = {
283 {"warning", required_argument, 0, 'w'}, 283 {"warning", required_argument, 0, 'w'},
284 {"critical", required_argument, 0, 'c'}, 284 {"critical", required_argument, 0, 'c'},
285 {"metric", required_argument, 0, 'm'}, 285 {"metric", required_argument, 0, 'm'},
@@ -303,7 +303,7 @@ process_arguments (int argc, char **argv)
303 303
304 while (1) { 304 while (1) {
305 c = getopt_long (argc, argv, "Vvht:c:w:p:s:u:C:a:z:r:m:P:", 305 c = getopt_long (argc, argv, "Vvht:c:w:p:s:u:C:a:z:r:m:P:",
306 long_options, &option_index); 306 longopts, &option);
307 307
308 if (c == -1 || c == EOF) 308 if (c == -1 || c == EOF)
309 break; 309 break;
@@ -362,7 +362,7 @@ process_arguments (int argc, char **argv)
362 if (statopts) 362 if (statopts)
363 break; 363 break;
364 else 364 else
365 statopts = strdup(optarg); 365 statopts = optarg;
366 asprintf (&fmt, _("%s%sSTATE = %s"), fmt, (options ? ", " : ""), statopts); 366 asprintf (&fmt, _("%s%sSTATE = %s"), fmt, (options ? ", " : ""), statopts);
367 options |= STAT; 367 options |= STAT;
368 break; 368 break;
@@ -397,7 +397,7 @@ process_arguments (int argc, char **argv)
397 if (prog) 397 if (prog)
398 break; 398 break;
399 else 399 else
400 prog = strdup(optarg); 400 prog = optarg;
401 asprintf (&fmt, _("%s%scommand name '%s'"), fmt, (options ? ", " : ""), 401 asprintf (&fmt, _("%s%scommand name '%s'"), fmt, (options ? ", " : ""),
402 prog); 402 prog);
403 options |= PROG; 403 options |= PROG;
@@ -406,7 +406,7 @@ process_arguments (int argc, char **argv)
406 if (args) 406 if (args)
407 break; 407 break;
408 else 408 else
409 args = strdup(optarg); 409 args = optarg;
410 asprintf (&fmt, _("%s%sargs '%s'"), fmt, (options ? ", " : ""), args); 410 asprintf (&fmt, _("%s%sargs '%s'"), fmt, (options ? ", " : ""), args);
411 options |= ARGS; 411 options |= ARGS;
412 break; 412 break;