From 80dcf8d3418f388e60d35cd4675ee57dbf716b9d Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 16 Jan 2014 16:33:39 +0400 Subject: [PATCH] plugin: Standartify add_plugin_func macro - drop '\' and ';' after the while(0) - drop empty line - use sizeof(*ptr) Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin.c b/plugin.c index 069cef9fb..ca40b25c9 100644 --- a/plugin.c +++ b/plugin.c @@ -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; \