aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-10-19 19:25:52 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-10-19 19:25:52 +0000
commit92585ee4a58f85eb7baddc2d8908955934a34334 (patch)
tree4accb713e092e6ee65af99c1bce8c8cbe9f8529a
parent3834b3262ac3f46cc401d9e027bb32aaa9df0424 (diff)
downloadmonitoring-plugins-92585ee4a58f85eb7baddc2d8908955934a34334.tar.gz
Removed asprintf for perf data (Craig Orsinger, Robby Giffin - 1310495)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1504 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--THANKS.in2
-rw-r--r--plugins/check_snmp.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/THANKS.in b/THANKS.in
index ad08a777..c7e44df3 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -195,3 +195,5 @@ Andreas Behal
O'Shaughnessy Evans
Aravind Gottipati
Kyle Tucker
+Craig Orsinger
+Robby Giffin
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 88f89c43..8cf1aa67 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -152,7 +152,6 @@ main (int argc, char **argv)
char *p2 = NULL;
char *show = NULL;
char type[8];
- char *str[MAX_INPUT_BUFFER];
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
@@ -349,8 +348,11 @@ main (int argc, char **argv)
i++;
- asprintf(str, "=%s%s;;;; ", show, type ? type : "");
- strcat(perfstr, *str);
+ strcat(perfstr, "=");
+ strcat(perfstr, show);
+ if (type)
+ strcat(perfstr, type);
+ strcat(perfstr, " ");
} /* end while (ptr) */