aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-10 06:53:22 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-10 06:53:22 +0000
commitf4f92be60c94fd4e0dd4b2b4b3101543eedb706a (patch)
tree28d25bd0ab624d82435823c940a186370947ad4d /plugins/check_http.c
parentcbf702f51f839af5a8e9c66bdae7d6a3dc363ace (diff)
downloadmonitoring-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_http.c')
-rw-r--r--plugins/check_http.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 3321d5ac..27127d6a 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -184,8 +184,8 @@ process_arguments (int argc, char **argv)
{
int c = 1;
- int option_index = 0;
- static struct option long_options[] = {
+ int option = 0;
+ static struct option longopts[] = {
STD_LONG_OPTS,
{"file",required_argument,0,'F'},
{"link", no_argument, 0, 'L'},
@@ -224,7 +224,7 @@ process_arguments (int argc, char **argv)
}
while (1) {
- c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nlLSm:", long_options, &option_index);
+ c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nlLSm:", longopts, &option);
if (c == -1 || c == EOF)
break;
@@ -304,10 +304,10 @@ process_arguments (int argc, char **argv)
break;
/* Note: H, I, and u must be malloc'd or will fail on redirects */
case 'H': /* Host Name (virtual host) */
- host_name = strdup (optarg);
+ host_name = optarg;
break;
case 'I': /* Server IP-address */
- server_address = strdup(optarg);
+ server_address = optarg;
break;
case 'u': /* URL path */
asprintf (&server_url, "%s", optarg);
@@ -328,7 +328,7 @@ process_arguments (int argc, char **argv)
case 'P': /* HTTP POST data in URL encoded format */
if (http_method || http_post_data) break;
http_method = strdup("POST");
- http_post_data = strdup(optarg);
+ http_post_data = optarg;
break;
case 's': /* string or substring */
strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1);