From f9a8f0ebfea028e894b51de4215e27cebd784b09 Mon Sep 17 00:00:00 2001 From: Jimmy Ohn Date: Fri, 13 Feb 2015 19:43:16 +0900 Subject: [PATCH] pulsesink: Enhance code readability in pulsesink_query In pulsesink_query function, we use a switch for the query type. In the CAPS case, there is no 'break', instead we return right away. Use a break and return at the end of the function instead for better code readability. https://bugzilla.gnome.org/show_bug.cgi?id=744461 --- ext/pulse/pulsesink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index abad2b8..eda321f 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -3174,7 +3174,7 @@ static gboolean gst_pulsesink_query (GstBaseSink * sink, GstQuery * query) { GstPulseSink *pulsesink = GST_PULSESINK_CAST (sink); - gboolean ret; + gboolean ret = FALSE; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_CAPS: @@ -3187,10 +3187,9 @@ gst_pulsesink_query (GstBaseSink * sink, GstQuery * query) if (caps) { gst_query_set_caps_result (query, caps); gst_caps_unref (caps); - return TRUE; - } else { - return FALSE; + ret = TRUE; } + break; } case GST_QUERY_ACCEPT_CAPS: { -- 2.7.4