X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Flua.c;h=9a43fc71adfcebdc7947e5ea28b092ed6c2791e5;hp=a87f3ea766bbed881f51aeaa05087df85dbf6f2d;hb=27ca3ca92a757b5c9bb3baa5a29ef352ec70b1c9;hpb=626d3ab4309cdb069289354c45ca9e2ba9bc9a2f diff --git a/src/lua.c b/src/lua.c index a87f3ea7..9a43fc71 100644 --- a/src/lua.c +++ b/src/lua.c @@ -28,10 +28,10 @@ * Ruben Kerkhof **/ +#include "collectd.h" #include "plugin.h" #include "utils/common/common.h" #include "utils_lua.h" -#include "collectd.h" /* Include the Lua API header files. */ #include @@ -322,14 +322,14 @@ static int lua_cb_register_generic(lua_State *L, int type) /* {{{ */ pthread_mutex_init(&cb->lock, NULL); if (PLUGIN_READ == type) { - int status = plugin_register_complex_read(/* group = */ "lua", - /* name = */ function_name, - /* callback = */ clua_read, - /* interval = */ 0, - &(user_data_t){ - .data = cb, - .free_func = lua_cb_free, - }); + int status = + plugin_register_complex_read(/* group = */ "lua", + /* name = */ function_name, + /* callback = */ clua_read, + /* interval = */ 0, + &(user_data_t){ + .data = cb, .free_func = lua_cb_free, + }); if (status != 0) return luaL_error(L, "%s", "plugin_register_complex_read failed"); @@ -338,8 +338,7 @@ static int lua_cb_register_generic(lua_State *L, int type) /* {{{ */ int status = plugin_register_write(/* name = */ function_name, /* callback = */ clua_write, &(user_data_t){ - .data = cb, - .free_func = lua_cb_free, + .data = cb, .free_func = lua_cb_free, }); if (status != 0)