Commit 80dcf8d3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

plugin: Standartify add_plugin_func macro

- drop '\' and ';' after the while(0)
- drop empty line
- use sizeof(*ptr)
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8f109f69
...@@ -47,15 +47,14 @@ struct cr_plugins cr_plugins; ...@@ -47,15 +47,14 @@ struct cr_plugins cr_plugins;
name = dlsym(h, #name); \ name = dlsym(h, #name); \
if (name) { \ if (name) { \
struct cr_plugin_entry *__ce; \ struct cr_plugin_entry *__ce; \
__ce = xmalloc(sizeof(struct cr_plugin_entry)); \ __ce = xmalloc(sizeof(*__ce)); \
if (__ce == NULL) \ if (__ce == NULL) \
goto nomem; \ goto nomem; \
__ce->name = name; \ __ce->name = name; \
__ce->next = cr_plugins.name; \ __ce->next = cr_plugins.name; \
cr_plugins.name = __ce; \ cr_plugins.name = __ce; \
} \ } \
} while (0); \ } while (0)
#define run_plugin_funcs(name, ...) ({ \ #define run_plugin_funcs(name, ...) ({ \
struct cr_plugin_entry *__ce = cr_plugins.name; \ struct cr_plugin_entry *__ce = cr_plugins.name; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment