diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-10 06:53:22 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-10 06:53:22 +0000 |
commit | f4f92be60c94fd4e0dd4b2b4b3101543eedb706a (patch) | |
tree | 28d25bd0ab624d82435823c940a186370947ad4d /plugins/check_procs.c | |
parent | cbf702f51f839af5a8e9c66bdae7d6a3dc363ace (diff) | |
download | monitoring-plugins-f4f92be60c94fd4e0dd4b2b4b3101543eedb706a.tar.gz |
the last round of pedantic compiler warnings
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@676 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_procs.c')
-rw-r--r-- | plugins/check_procs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 1894b281..5313b977 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; |