From 336c20760f0fcdf709bdd988b951640baed19a47 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 13 Aug 2016 14:37:15 +0200 Subject: [PATCH] Lua plugin: wrap debug code in COLLECT_DEBUG No use formatting the string if we're not going to use it. --- src/lua.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lua.c b/src/lua.c index bbfcb2f8..b89c8240 100644 --- 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); -- 2.30.2