summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-05-21 21:24:42 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-05-27 10:43:32 +0200
commit886d29fced0bcc1668a3cb99a5bca66ea486b3a4 (patch)
tree0da4e178cdadea815018673735f5f92a2e4ea464 /src
parent2965f42fed62b77a5b0e7f6cd01c4be1072484f5 (diff)
downloadsssd-886d29fced0bcc1668a3cb99a5bca66ea486b3a4.tar.gz
sssd-886d29fced0bcc1668a3cb99a5bca66ea486b3a4.tar.xz
sssd-886d29fced0bcc1668a3cb99a5bca66ea486b3a4.zip
SBUS: Consolidate VTABLE_FUNC definitions in sssd_dbus_meta.h
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 <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/sbus/sssd_dbus_connection.c4
-rw-r--r--src/sbus/sssd_dbus_meta.h4
-rw-r--r--src/sbus/sssd_dbus_private.h4
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 {