projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0230923
)
Lua plugin: wrap debug code in COLLECT_DEBUG
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 12:37:15 +0000
(14:37 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 12:37:15 +0000
(14:37 +0200)
No use formatting the string if we're not going to use it.
src/lua.c
patch
|
blob
|
history
diff --git
a/src/lua.c
b/src/lua.c
index
bbfcb2f
..
b89c824
100644
(file)
--- a/
src/lua.c
+++ b/
src/lua.c
@@
-260,6
+260,7
@@
static int lua_cb_dispatch_values(lua_State *L) /* {{{ */
if (vl == NULL)
return luaL_error(L, "%s", "luaC_tovaluelist failed");
+#if COLLECT_DEBUG
char identifier[6 * DATA_MAX_NAME_LEN];
FORMAT_VL(identifier, sizeof(identifier), vl);
@@
-267,6
+268,7
@@
static int lua_cb_dispatch_values(lua_State *L) /* {{{ */
"time %.3f, interval %.3f.",
identifier, CDTIME_T_TO_DOUBLE(vl->time),
CDTIME_T_TO_DOUBLE(vl->interval));
+#endif
plugin_dispatch_values(vl);