summaryrefslogtreecommitdiffstats
path: root/web/attachments/121776-nagiosplug-cvs-ansiC.diff
blob: 58d67fd930848dcfa8e66cde09454d4c420da550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff -urN ./plugins/check_by_ssh.c ../plugins/plugins/check_by_ssh.c
--- ./plugins/check_by_ssh.c	2005-01-05 21:53:11.000000000 +0100
+++ ../plugins/plugins/check_by_ssh.c	2005-02-17 13:19:35.000000000 +0100
@@ -246,7 +246,7 @@
 		case 's':									/* description of service to check */
 			service = realloc (service, (++services) * sizeof(char *));
 			p1 = optarg;
-			while ((p2 = index (p1, ':'))) {
+			while ((p2 = strchr (p1, ':'))) {
 				*p2 = '\0';
 				asprintf (&service[services-1], "%s", p1);
 				service = realloc (service, (++services) * sizeof(char *));
diff -urN ./plugins/check_dig.c ../plugins/plugins/check_dig.c
--- ./plugins/check_dig.c	2005-01-28 15:00:58.000000000 +0100
+++ ../plugins/plugins/check_dig.c	2005-02-17 13:55:05.000000000 +0100
@@ -127,7 +127,7 @@
 
 				/* Translate output TAB -> SPACE */
 				t = output;
-				while ((t = index(t, '\t')) != NULL) 
+				while ((t = strchr(t, '\t')) != NULL) 
 					*t = ' ';
 
 			} while (!strstr (input_buffer, ";; "));
@@ -149,7 +149,7 @@
 		result = max_state (result, STATE_WARNING);
 		printf ("%s", input_buffer);
 		if (strlen (output) == 0)
-			output = strdup (1 + index (input_buffer, ':'));
+			output = strdup (1 + strchr (input_buffer, ':'));
 	}
 
 	(void) fclose (child_stderr);