diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-19 19:25:52 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-10-19 19:25:52 (GMT) |
commit | 92585ee4a58f85eb7baddc2d8908955934a34334 (patch) | |
tree | 4accb713e092e6ee65af99c1bce8c8cbe9f8529a | |
parent | 3834b3262ac3f46cc401d9e027bb32aaa9df0424 (diff) | |
download | monitoring-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.in | 2 | ||||
-rw-r--r-- | plugins/check_snmp.c | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -195,3 +195,5 @@ Andreas Behal | |||
195 | O'Shaughnessy Evans | 195 | O'Shaughnessy Evans |
196 | Aravind Gottipati | 196 | Aravind Gottipati |
197 | Kyle Tucker | 197 | Kyle Tucker |
198 | Craig Orsinger | ||
199 | Robby Giffin | ||
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 88f89c4..8cf1aa6 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -152,7 +152,6 @@ main (int argc, char **argv) | |||
152 | char *p2 = NULL; | 152 | char *p2 = NULL; |
153 | char *show = NULL; | 153 | char *show = NULL; |
154 | char type[8]; | 154 | char type[8]; |
155 | char *str[MAX_INPUT_BUFFER]; | ||
156 | 155 | ||
157 | setlocale (LC_ALL, ""); | 156 | setlocale (LC_ALL, ""); |
158 | bindtextdomain (PACKAGE, LOCALEDIR); | 157 | bindtextdomain (PACKAGE, LOCALEDIR); |
@@ -349,8 +348,11 @@ main (int argc, char **argv) | |||
349 | 348 | ||
350 | i++; | 349 | i++; |
351 | 350 | ||
352 | asprintf(str, "=%s%s;;;; ", show, type ? type : ""); | 351 | strcat(perfstr, "="); |
353 | strcat(perfstr, *str); | 352 | strcat(perfstr, show); |
353 | if (type) | ||
354 | strcat(perfstr, type); | ||
355 | strcat(perfstr, " "); | ||
354 | 356 | ||
355 | } /* end while (ptr) */ | 357 | } /* end while (ptr) */ |
356 | 358 | ||