--- audio/gateway.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/audio/gateway.c b/audio/gateway.c index ca44576..b98dfba 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) -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html