diff options
Diffstat (limited to 'plugins/check_real.c')
-rw-r--r-- | plugins/check_real.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_real.c b/plugins/check_real.c index 9c9c3e0..3e8475a 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c | |||
@@ -256,8 +256,8 @@ process_arguments (int argc, char **argv) | |||
256 | { | 256 | { |
257 | int c; | 257 | int c; |
258 | 258 | ||
259 | int option_index = 0; | 259 | int option = 0; |
260 | static struct option long_options[] = { | 260 | static struct option longopts[] = { |
261 | {"hostname", required_argument, 0, 'H'}, | 261 | {"hostname", required_argument, 0, 'H'}, |
262 | {"IPaddress", required_argument, 0, 'I'}, | 262 | {"IPaddress", required_argument, 0, 'I'}, |
263 | {"expect", required_argument, 0, 'e'}, | 263 | {"expect", required_argument, 0, 'e'}, |
@@ -285,8 +285,8 @@ process_arguments (int argc, char **argv) | |||
285 | } | 285 | } |
286 | 286 | ||
287 | while (1) { | 287 | while (1) { |
288 | c = getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", long_options, | 288 | c = getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", longopts, |
289 | &option_index); | 289 | &option); |
290 | 290 | ||
291 | if (c == -1 || c == EOF) | 291 | if (c == -1 || c == EOF) |
292 | break; | 292 | break; |
@@ -297,15 +297,15 @@ process_arguments (int argc, char **argv) | |||
297 | if (server_address) | 297 | if (server_address) |
298 | break; | 298 | break; |
299 | else if (is_host (optarg)) | 299 | else if (is_host (optarg)) |
300 | server_address = strdup(optarg); | 300 | server_address = optarg; |
301 | else | 301 | else |
302 | usage (_("Invalid host name\n")); | 302 | usage (_("Invalid host name\n")); |
303 | break; | 303 | break; |
304 | case 'e': /* string to expect in response header */ | 304 | case 'e': /* string to expect in response header */ |
305 | server_expect = strdup(optarg); | 305 | server_expect = optarg; |
306 | break; | 306 | break; |
307 | case 'u': /* server URL */ | 307 | case 'u': /* server URL */ |
308 | server_url = strdup(optarg); | 308 | server_url = optarg; |
309 | break; | 309 | break; |
310 | case 'p': /* port */ | 310 | case 'p': /* port */ |
311 | if (is_intpos (optarg)) { | 311 | if (is_intpos (optarg)) { |