[telepathy-mission-control/master] McdDispatcherContext: remove vestigial main_channel member

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Sep 29 10:57:58 PDT 2009


This is never assigned to, so the one code path that looks at it should
just consider it to be always-NULL; with that in mind, we can simplify.
---
 src/mcd-dispatcher.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 6eb7b89..d6fc50d 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -118,7 +118,6 @@ struct _McdDispatcherContext
     McdDispatcher *dispatcher;
 
     GList *channels;
-    McdChannel *main_channel;
     McdAccount *account;
     McdDispatchOperation *operation;
     /* bus names (including the common prefix) in preference order */
@@ -3450,10 +3449,8 @@ McdChannel *
 mcd_dispatcher_context_get_channel (McdDispatcherContext * ctx)
 {
     g_return_val_if_fail (ctx, 0);
-    if (ctx->main_channel)
-        return ctx->main_channel;
-    else
-        return ctx->channels ? MCD_CHANNEL (ctx->channels->data) : NULL;
+
+    return ctx->channels ? MCD_CHANNEL (ctx->channels->data) : NULL;
 }
 
 /**
-- 
1.5.6.5




More information about the telepathy-commits mailing list