diff options
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2003-04-13 04:49:58 +0000 |
---|---|---|
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2003-04-13 04:49:58 +0000 |
commit | 48ad288b899bc1f10b6ee18514b6fef51c8eb17a (patch) | |
tree | 8359748eddabbf5b75ff6c7de3644237320b58f8 /plugins/check_hpjd.c | |
parent | 1934d3c2252f4f2f9539acedf93737887598d34b (diff) | |
download | monitoring-plugins-48ad288b899bc1f10b6ee18514b6fef51c8eb17a.tar.gz |
reduce compiler warning between gcc3 and gcc2.96
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@492 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_hpjd.c')
-rw-r--r-- | plugins/check_hpjd.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 7fb1d5a7..6503d52d 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -91,6 +91,7 @@ main (int argc, char **argv) int door_open = 0; int paper_output = 0; char display_message[MAX_INPUT_BUFFER]; + char *temp ; if (process_arguments (argc, argv) != OK) usage ("Invalid command arguments supplied\n"); @@ -280,14 +281,8 @@ main (int argc, char **argv) /* if there wasn't any output, display an error */ if (line == 0) { - /* - result=STATE_UNKNOWN; - strcpy(error_message,"Error: Could not read plugin output\n"); - */ - - /* might not be the problem, but most likely is.. */ - result = STATE_UNKNOWN; - char *temp ; + /* might not be the problem, but most likely is. */ + result = STATE_UNKNOWN ; asprintf (&temp, error_message); sprintf (error_message, "%s : Timeout from host %s\n", temp, address ); @@ -472,24 +467,4 @@ Usage:\n\ } -/* - if(argc<2||argc>3){ - printf("Incorrect number of arguments supplied\n"); - print_revision(argv[0],"$Revision$"); - printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"); - printf("License: GPL\n"); - printf("Usage: %s <ip_address> [community]\n",argv[0]); - printf("Note:\n"); - printf(" <ip_address> = The IP address of the JetDirect card\n"); - printf(" [community] = An optional community string used for SNMP communication\n"); - printf(" with the JetDirect card. The default is 'public'.\n"); - return STATE_UNKNOWN; - } - // get the IP address of the JetDirect device - strcpy(address,argv[1]); - // get the community name to use for SNMP communication - if(argc>=3) - strcpy(community,argv[2]); - else - strcpy(community,"public"); -*/ + |