Просмотр исходного кода

change a bunch of whitespaces (no code was harmed)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1720 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest 18 лет назад
Родитель
Сommit
757e1676f1
1 измененных файлов с 22 добавлено и 22 удалено
  1. 22 22
      plugins/check_snmp.c

+ 22 - 22
plugins/check_snmp.c

@@ -184,13 +184,13 @@ main (int argc, char **argv)
 	/* create the command line to execute */
 	/* create the command line to execute */
 		if(usesnmpgetnext == TRUE) {
 		if(usesnmpgetnext == TRUE) {
 		asprintf(&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
 		asprintf(&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
-				    PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
-						authpriv, server_address, port, oid);
+			PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
+			authpriv, server_address, port, oid);
 	}else{
 	}else{
 
 
 		asprintf (&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
 		asprintf (&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
-	          PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
-	          authpriv, server_address, port, oid);
+			PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
+			authpriv, server_address, port, oid);
 	}
 	}
 	
 	
 	if (verbose)
 	if (verbose)
@@ -343,11 +343,11 @@ main (int argc, char **argv)
 		/* Prepend a label for this OID if there is one */
 		/* Prepend a label for this OID if there is one */
 		if (nlabels > (size_t)1 && (size_t)i < nlabels && labels[i] != NULL)
 		if (nlabels > (size_t)1 && (size_t)i < nlabels && labels[i] != NULL)
 			asprintf (&outbuff, "%s%s%s %s%s%s", outbuff,
 			asprintf (&outbuff, "%s%s%s %s%s%s", outbuff,
-			          (i == 0) ? " " : output_delim,
-			          labels[i], mark (iresult), show, mark (iresult));
+				(i == 0) ? " " : output_delim,
+				labels[i], mark (iresult), show, mark (iresult));
 		else
 		else
 			asprintf (&outbuff, "%s%s%s%s%s", outbuff, (i == 0) ? " " : output_delim,
 			asprintf (&outbuff, "%s%s%s%s%s", outbuff, (i == 0) ? " " : output_delim,
-			          mark (iresult), show, mark (iresult));
+				mark (iresult), show, mark (iresult));
 
 
 		/* Append a unit string for this OID if there is one */
 		/* Append a unit string for this OID if there is one */
 		if (nunits > (size_t)0 && (size_t)i < nunits && unitv[i] != NULL)
 		if (nunits > (size_t)0 && (size_t)i < nunits && unitv[i] != NULL)
@@ -365,9 +365,9 @@ main (int argc, char **argv)
 
 
 	if (found == 0)
 	if (found == 0)
 		die (STATE_UNKNOWN,
 		die (STATE_UNKNOWN,
-		     _("%s problem - No data received from host\nCMD: %s\n"),
-		     label,
-		     command_line);
+			_("%s problem - No data received from host\nCMD: %s\n"),
+			label,
+			command_line);
 
 
 	/* WARNING if output found on stderr */
 	/* WARNING if output found on stderr */
 	if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
 	if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
@@ -466,31 +466,31 @@ process_arguments (int argc, char **argv)
 		case 'H':									/* Host or server */
 		case 'H':									/* Host or server */
 			server_address = optarg;
 			server_address = optarg;
 			break;
 			break;
-		case 'p':       /* TCP port number */
+		case 'p':	/* TCP port number */
 			port = optarg;
 			port = optarg;
 			break;
 			break;
-		case 'm':      /* List of MIBS  */
+		case 'm':	/* List of MIBS  */
 			miblist = optarg;
 			miblist = optarg;
 			break;
 			break;
-		case 'n':     /* usesnmpgetnext */
+		case 'n':	/* usesnmpgetnext */
 			usesnmpgetnext = TRUE;
 			usesnmpgetnext = TRUE;
 			break;
 			break;
-		case 'P':     /* SNMP protocol version */
+		case 'P':	/* SNMP protocol version */
 			proto = optarg;
 			proto = optarg;
 			break;
 			break;
-		case 'L':     /* security level */
+		case 'L':	/* security level */
 			seclevel = optarg;
 			seclevel = optarg;
 			break;
 			break;
-		case 'U':     /* security username */
+		case 'U':	/* security username */
 			secname = optarg;
 			secname = optarg;
 			break;
 			break;
-		case 'a':     /* auth protocol */
+		case 'a':	/* auth protocol */
 			authproto = optarg;
 			authproto = optarg;
 			break;
 			break;
-		case 'A':     /* auth passwd */
+		case 'A':	/* auth passwd */
 			authpasswd = optarg;
 			authpasswd = optarg;
 			break;
 			break;
-		case 'X':     /* priv passwd */
+		case 'X':	/* priv passwd */
 			privpasswd = optarg;
 			privpasswd = optarg;
 			break;
 			break;
 		case 't':	/* timeout period */
 		case 't':	/* timeout period */
@@ -701,14 +701,14 @@ validate_arguments ()
 	
 	
 	 
 	 
 	
 	
-	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {        /* default protocol version */
+	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {	/* default protocol version */
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 	}
 	}
-	else if ( strcmp (proto, "2c") == 0 ) {                 /* snmpv2c args */
+	else if ( strcmp (proto, "2c") == 0 ) {		/* snmpv2c args */
 		asprintf(&authpriv, "%s%s", "-c ", community);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 	}
 	}
-	else if ( strcmp (proto, "3") == 0 ) {                 /* snmpv3 args */
+	else if ( strcmp (proto, "3") == 0 ) {		/* snmpv3 args */
 		asprintf(&proto, "%s", "3");
 		asprintf(&proto, "%s", "3");
 		
 		
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {