queue: fix compiler warning
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 15 Jun 2009 19:11:05 +0000 (20:11 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 15 Jun 2009 19:11:05 +0000 (20:11 +0100)
The compiler suggests to add some () to indicate if the && or the || takes
priority, so reflow code a bit so we don't have to add yet another layer
of (). Hopefully this was the intended meaning of the code.

plugins/elements/gstqueue.c

index be16c0c..175fc6b 100644 (file)
@@ -825,16 +825,18 @@ out_eos:
 static gboolean
 gst_queue_is_empty (GstQueue * queue)
 {
+  if (queue->queue->length == 0)
+    return TRUE;
+
   /* It is possible that a max size is reached before all min thresholds are.
    * Therefore, only consider it empty if it is not filled. */
-  return (queue->queue->length == 0 ||
-      ((queue->min_threshold.buffers > 0 &&
-              queue->cur_level.buffers < queue->min_threshold.buffers) ||
-          (queue->min_threshold.bytes > 0 &&
-              queue->cur_level.bytes < queue->min_threshold.bytes) ||
-          (queue->min_threshold.time > 0 &&
-              queue->cur_level.time < queue->min_threshold.time)) &&
-      !gst_queue_is_filled (queue));
+  return ((queue->min_threshold.buffers > 0 &&
+          queue->cur_level.buffers < queue->min_threshold.buffers) ||
+      (queue->min_threshold.bytes > 0 &&
+          queue->cur_level.bytes < queue->min_threshold.bytes) ||
+      (queue->min_threshold.time > 0 &&
+          queue->cur_level.time < queue->min_threshold.time)) &&
+      !gst_queue_is_filled (queue);
 }
 
 static gboolean