summaryrefslogtreecommitdiffstats
path: root/plugins/check_nt.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_nt.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_nt.c')
-rw-r--r--plugins/check_nt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index b1314d4b..3b2bd5e1 100644
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
@@ -28,7 +28,6 @@
28 * 28 *
29 *****************************************************************************/ 29 *****************************************************************************/
30 30
31#include "config.h"
32#include "common.h" 31#include "common.h"
33#include "netutils.h" 32#include "netutils.h"
34#include "utils.h" 33#include "utils.h"
@@ -331,8 +330,8 @@ int main(int argc, char **argv){
331int process_arguments(int argc, char **argv){ 330int process_arguments(int argc, char **argv){
332 int c; 331 int c;
333 332
334 int option_index = 0; 333 int option = 0;
335 static struct option long_options[] = 334 static struct option longopts[] =
336 { 335 {
337 {"port", required_argument,0,'p'}, 336 {"port", required_argument,0,'p'},
338 {"timeout", required_argument,0,'t'}, 337 {"timeout", required_argument,0,'t'},
@@ -366,7 +365,7 @@ int process_arguments(int argc, char **argv){
366 } 365 }
367 366
368 while (1){ 367 while (1){
369 c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",long_options,&option_index); 368 c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",longopts,&option);
370 369
371 if (c==-1||c==EOF||c==1) 370 if (c==-1||c==EOF||c==1)
372 break; 371 break;
@@ -385,10 +384,10 @@ int process_arguments(int argc, char **argv){
385 exit(STATE_OK); 384 exit(STATE_OK);
386 case 'H': /* hostname */ 385 case 'H': /* hostname */
387 if (server_address) free(server_address); 386 if (server_address) free(server_address);
388 server_address = strdup(optarg); 387 server_address = optarg;
389 break; 388 break;
390 case 's': /* password */ 389 case 's': /* password */
391 req_password = strdup (optarg); 390 req_password = optarg;
392 break; 391 break;
393 case 'p': /* port */ 392 case 'p': /* port */
394 if (is_intnonneg(optarg)) 393 if (is_intnonneg(optarg))
@@ -421,7 +420,7 @@ int process_arguments(int argc, char **argv){
421 return ERROR; 420 return ERROR;
422 break; 421 break;
423 case 'l': /* value list */ 422 case 'l': /* value list */
424 value_list = strdup (optarg); 423 value_list = optarg;
425 break; 424 break;
426 case 'w': /* warning threshold */ 425 case 'w': /* warning threshold */
427 warning_value=strtoul(optarg,NULL,10); 426 warning_value=strtoul(optarg,NULL,10);