summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-10 06:53:22 +0000
committerKarl 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)
184{ 184{
185 int c = 1; 185 int c = 1;
186 186
187 int option_index = 0; 187 int option = 0;
188 static struct option long_options[] = { 188 static struct option longopts[] = {
189 STD_LONG_OPTS, 189 STD_LONG_OPTS,
190 {"file",required_argument,0,'F'}, 190 {"file",required_argument,0,'F'},
191 {"link", no_argument, 0, 'L'}, 191 {"link", no_argument, 0, 'L'},
@@ -224,7 +224,7 @@ process_arguments (int argc, char **argv)
224 } 224 }
225 225
226 while (1) { 226 while (1) {
227 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); 227 c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nlLSm:", longopts, &option);
228 if (c == -1 || c == EOF) 228 if (c == -1 || c == EOF)
229 break; 229 break;
230 230
@@ -304,10 +304,10 @@ process_arguments (int argc, char **argv)
304 break; 304 break;
305 /* Note: H, I, and u must be malloc'd or will fail on redirects */ 305 /* Note: H, I, and u must be malloc'd or will fail on redirects */
306 case 'H': /* Host Name (virtual host) */ 306 case 'H': /* Host Name (virtual host) */
307 host_name = strdup (optarg); 307 host_name = optarg;
308 break; 308 break;
309 case 'I': /* Server IP-address */ 309 case 'I': /* Server IP-address */
310 server_address = strdup(optarg); 310 server_address = optarg;
311 break; 311 break;
312 case 'u': /* URL path */ 312 case 'u': /* URL path */
313 asprintf (&server_url, "%s", optarg); 313 asprintf (&server_url, "%s", optarg);
@@ -328,7 +328,7 @@ process_arguments (int argc, char **argv)
328 case 'P': /* HTTP POST data in URL encoded format */ 328 case 'P': /* HTTP POST data in URL encoded format */
329 if (http_method || http_post_data) break; 329 if (http_method || http_post_data) break;
330 http_method = strdup("POST"); 330 http_method = strdup("POST");
331 http_post_data = strdup(optarg); 331 http_post_data = optarg;
332 break; 332 break;
333 case 's': /* string or substring */ 333 case 's': /* string or substring */
334 strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1); 334 strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1);