[Nagiosplug-checkins] CVS: nagiosplug/plugins check_hpjd.c,1.12,1.13

Subhendu Ghosh sghosh at users.sourceforge.net
Sat Apr 12 21:51:01 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv32554/plugins

Modified Files:
	check_hpjd.c 
Log Message:
reduce compiler warning between gcc3 and gcc2.96

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** check_hpjd.c	11 Apr 2003 18:44:50 -0000	1.12
--- check_hpjd.c	13 Apr 2003 04:49:58 -0000	1.13
***************
*** 92,95 ****
--- 92,96 ----
  	int paper_output = 0;
  	char display_message[MAX_INPUT_BUFFER];
+ 	char *temp ;
  
  	if (process_arguments (argc, argv) != OK)
***************
*** 281,292 ****
  	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 ;
  		asprintf (&temp, error_message);
  		sprintf (error_message, "%s : Timeout from host %s\n", temp, address );
--- 282,287 ----
  	if (line == 0) {
  
! 		/* 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 );
***************
*** 473,495 ****
  
  
! /*
! 	if(argc<2||argc>3){
! 	printf("Incorrect number of arguments supplied\n");
! 	print_revision(argv[0],"$Revision$");
! 	printf("Copyright (c) 1999 Ethan Galstad (nagios at 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");
! */
--- 468,470 ----
  
  
! 





More information about the Commits mailing list