From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/121776-nagiosplug-cvs-ansiC.diff | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 web/attachments/121776-nagiosplug-cvs-ansiC.diff (limited to 'web/attachments/121776-nagiosplug-cvs-ansiC.diff') 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 @@ +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); -- cgit v1.2.3-74-g34f1