From c4f0fadc905734ac1a3a0cef62eb7352f26360fe Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 17 Sep 2013 15:09:43 +0200 Subject: factor out add_always_present_connection_interfaces() https://bugs.freedesktop.org/show_bug.cgi?id=69466 --- src/connection.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/connection.c b/src/connection.c index 2030500..e7f1994 100644 --- a/src/connection.c +++ b/src/connection.c @@ -113,18 +113,25 @@ haze_connection_get_implemented_interfaces (void) return implemented_interfaces; } +static void +add_always_present_connection_interfaces (GPtrArray *interfaces) +{ + const gchar **iter; + + for (iter = implemented_interfaces + HAZE_NUM_CONDITIONAL_INTERFACES; + *iter != NULL; iter++) + g_ptr_array_add (interfaces, (gchar *) *iter); +} + static GPtrArray * haze_connection_get_interfaces_always_present (TpBaseConnection *base) { GPtrArray *interfaces; - const gchar **iter; interfaces = TP_BASE_CONNECTION_CLASS ( haze_connection_parent_class)->get_interfaces_always_present (base); - for (iter = implemented_interfaces + HAZE_NUM_CONDITIONAL_INTERFACES; - *iter != NULL; iter++) - g_ptr_array_add (interfaces, (gchar *) *iter); + add_always_present_connection_interfaces (interfaces); return interfaces; } -- cgit v1.2.3