From 886d29fced0bcc1668a3cb99a5bca66ea486b3a4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 21 May 2014 21:24:42 +0200 Subject: SBUS: Consolidate VTABLE_FUNC definitions in sssd_dbus_meta.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We had several duplicated declarations of the VTABLE_FUNC macro in the SSSD source code. This patch consolidates on one definition in sssd_dbus_meta.h that is usable by all consumers, including the upcoming GetAll method implementation. Reviewed-by: Pavel Březina Reviewed-by: Lukáš Slebodník --- src/sbus/sssd_dbus_connection.c | 4 ---- src/sbus/sssd_dbus_meta.h | 4 ++++ src/sbus/sssd_dbus_private.h | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c index af1c8c56a..06256a85b 100644 --- a/src/sbus/sssd_dbus_connection.c +++ b/src/sbus/sssd_dbus_connection.c @@ -394,10 +394,6 @@ static bool sbus_iface_handles_path(struct sbus_interface_p *intf_p, return strcmp(path, intf_p->intf->path) == 0; } -/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ -#define VTABLE_FUNC(vtable, offset) \ - (*((void **)((char *)(vtable) + (offset)))) - static void sbus_handler_got_caller_id(struct tevent_req *req); /* messsage_handler diff --git a/src/sbus/sssd_dbus_meta.h b/src/sbus/sssd_dbus_meta.h index 89f11224b..2cb9e95e3 100644 --- a/src/sbus/sssd_dbus_meta.h +++ b/src/sbus/sssd_dbus_meta.h @@ -33,6 +33,10 @@ * http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format */ +/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ +#define VTABLE_FUNC(vtable, offset) \ + (*((void **)((char *)(vtable) + (offset)))) + struct sbus_arg_meta { const char *name; const char *type; diff --git a/src/sbus/sssd_dbus_private.h b/src/sbus/sssd_dbus_private.h index fa11bc1c8..624448d30 100644 --- a/src/sbus/sssd_dbus_private.h +++ b/src/sbus/sssd_dbus_private.h @@ -68,10 +68,6 @@ struct sbus_connection { struct sbus_watch_ctx *watch_list; }; -/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ -#define VTABLE_FUNC(vtable, offset) \ - (*((void **)((char *)(vtable) + (offset)))) - /* =Watches=============================================================== */ struct sbus_watch_ctx { -- cgit