mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 12:57:57 +00:00
plugin: Standartify add_plugin_func macro
- drop '\' and ';' after the while(0) - drop empty line - use sizeof(*ptr) Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
8f109f69d8
commit
80dcf8d341
5
plugin.c
5
plugin.c
@ -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; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user