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