Explorar o código

remove unused variables

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@173 f882894a-f735-0410-b71e-b25c423dba1c
Karl DeBisschop %!s(int64=23) %!d(string=hai) anos
pai
achega
34ba941736
Modificáronse 6 ficheiros con 7 adicións e 13 borrados
  1. 1 2
      plugins/check_http.c
  2. 1 1
      plugins/check_load.c
  3. 3 6
      plugins/check_ping.c
  4. 1 1
      plugins/check_procs.c
  5. 1 1
      plugins/check_smtp.c
  6. 0 2
      plugins/check_tcp.c

+ 1 - 2
plugins/check_http.c

@@ -269,8 +269,7 @@ main (int argc, char **argv)
 int
 process_arguments (int argc, char **argv)
 {
-	int c, i = 1;
-	char optchars[MAX_INPUT_BUFFER];
+	int c = 1;
 
 #ifdef HAVE_GETOPT_H
 	int option_index = 0;

+ 1 - 1
plugins/check_load.c

@@ -151,7 +151,7 @@ main (int argc, char **argv)
 int
 process_arguments (int argc, char **argv)
 {
-	int c, i = 0;
+	int c = 0;
 
 #ifdef HAVE_GETOPT_H
 	int option_index = 0;

+ 3 - 6
plugins/check_ping.c

@@ -151,7 +151,7 @@ main (int argc, char **argv)
 int
 process_arguments (int argc, char **argv)
 {
-	int c, i = 1;
+	int c = 1;
 
 #ifdef HAVE_GETOPT_H
 	int option_index = 0;
@@ -455,15 +455,12 @@ run_ping (char *command_line)
 		else
 			sprintf (warn_text, "%s %s", warn_text, input_buffer);
 
-		if (strstr (input_buffer, "DUPLICATES FOUND"))
-			/* cannot use the max function since STATE_UNKNOWN is max
-			result = max (result, STATE_WARNING); */
+		if (strstr (input_buffer, "DUPLICATES FOUND")) {
 			if( !(result == STATE_CRITICAL) ){
 				result = STATE_WARNING;
 			}
+		}
 		else
-			/* cannot use the max function since STATE_UNKNOWN is max
-			result = max (result, STATE_CRITICAL); */
 			result = STATE_CRITICAL ;
 	}
 	(void) fclose (child_stderr);

+ 1 - 1
plugins/check_procs.c

@@ -257,7 +257,7 @@ main (int argc, char **argv)
 int
 process_arguments (int argc, char **argv)
 {
-	int c, i = 1;
+	int c = 1;
 	char *user;
 	struct passwd *pw;
 #ifdef HAVE_GETOPT_H

+ 1 - 1
plugins/check_smtp.c

@@ -78,7 +78,7 @@ int verbose = FALSE;
 int
 main (int argc, char **argv)
 {
-	int sd, c;
+	int sd;
 	int result;
 	char buffer[MAX_INPUT_BUFFER] = "";
 	char *from_str = NULL;

+ 0 - 2
plugins/check_tcp.c

@@ -100,8 +100,6 @@ main (int argc, char **argv)
 	int i;
 	char buffer[MAX_INPUT_BUFFER] = "";
 	char *status = "";
-	char *output = NULL;
-	char *ptr = NULL;
 	struct timeval tv;
 
 	if (strstr (argv[0], "check_udp")) {