2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +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:
Cyrill Gorcunov 2014-01-16 16:33:39 +04:00 committed by Pavel Emelyanov
parent 8f109f69d8
commit 80dcf8d341

View File

@ -47,15 +47,14 @@ struct cr_plugins cr_plugins;
name = dlsym(h, #name); \
if (name) { \
struct cr_plugin_entry *__ce; \
__ce = xmalloc(sizeof(struct cr_plugin_entry)); \
__ce = xmalloc(sizeof(*__ce)); \
if (__ce == NULL) \
goto nomem; \
__ce->name = name; \
__ce->next = cr_plugins.name; \
cr_plugins.name = __ce; \
} \
} while (0); \
} while (0)
#define run_plugin_funcs(name, ...) ({ \
struct cr_plugin_entry *__ce = cr_plugins.name; \