From: Ruben Kerkhof Date: Sat, 13 Aug 2016 12:37:15 +0000 (+0200) Subject: Lua plugin: wrap debug code in COLLECT_DEBUG X-Git-Tag: collectd-5.6.0~33^2~11 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=336c20760f0fcdf709bdd988b951640baed19a47;p=collectd.git Lua plugin: wrap debug code in COLLECT_DEBUG No use formatting the string if we're not going to use it. --- 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);