From dd88153891b488a5ab54480ee2a10e45817ffd56 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 26 Oct 2016 18:11:27 +0000 Subject: Remove ?: operator to avoid confusion It has lower prescedence than - so the - was being evaluated first. Instead of adding more parens I'm just removing it to make it more readable. --- src/util/mq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/util/mq.c b/src/util/mq.c index 193823c93..cb380de43 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -335,7 +335,11 @@ GNUNET_MQ_discard (struct GNUNET_MQ_Envelope *ev) unsigned int GNUNET_MQ_get_length (struct GNUNET_MQ_Handle *mq) { - return mq->queue_length - (GNUNET_YES == mq->in_flight) ? 1 : 0; + if (GNUNET_YES != mq->in_flight) + { + return mq->queue_length; + } + return mq->queue_length - 1; } -- cgit v1.2.3