]> source.dussan.org Git - rspamd.git/commitdiff
Unbreak function pointer passing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Feb 2016 20:25:49 +0000 (20:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 Feb 2016 23:11:21 +0000 (23:11 +0000)
src/rspamadm/rspamadm.c

index d91b6630463c683d6f6db3647f7d03b6276f6dd9..61c06c887966306ed12fe57dff0df8295ab44793 100644 (file)
@@ -46,21 +46,13 @@ static gboolean rspamadm_parse_ucl_var (const gchar *option_name,
                const gchar *value, gpointer data,
                GError **error);
 
-static union {
-       gboolean (*func)(const gchar *option_name,
-                                       const gchar *value, gpointer data,
-                                       GError **error);
-       const gpointer ptr;
-} rspamadm_parse_ucl_var_un = {
-       .func = &rspamadm_parse_ucl_var
-};
 
 static GOptionEntry entries[] = {
        {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
                        "Enable verbose logging", NULL},
        {"list-commands", 'l', 0, G_OPTION_ARG_NONE, &list_commands,
                        "List available commands", NULL},
-       {"var", 0, 0, G_OPTION_ARG_CALLBACK, &rspamadm_parse_ucl_var_un,
+       {"var", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer)&rspamadm_parse_ucl_var,
                        "Redefine UCL variable", NULL},
        {"help", 'h', 0, G_OPTION_ARG_NONE, &show_help,
                        "Show help", NULL},