From f245d02b7a8db7010cb73a02ba60416efce0fd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= Date: Fri, 23 Sep 2011 14:59:24 +0200 Subject: [PATCH] Remove unneeded checks in gateway_is_connected --- audio/gateway.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/audio/gateway.c b/audio/gateway.c index ca44576d8..b98dfbafa 100644 --- a/audio/gateway.c +++ b/audio/gateway.c @@ -760,8 +760,12 @@ struct gateway *gateway_init(struct audio_device *dev) gboolean gateway_is_connected(struct audio_device *dev) { - return (dev && dev->gateway && - dev->gateway->state == GATEWAY_STATE_CONNECTED); + struct gateway *gw = dev->gateway; + + if (gw->state == GATEWAY_STATE_CONNECTED) + return TRUE; + + return FALSE; } gboolean gateway_is_active(struct audio_device *dev) -- 2.47.3