diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2016-10-26 18:11:27 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2016-10-26 18:11:27 +0000 |
commit | dd88153891b488a5ab54480ee2a10e45817ffd56 (patch) | |
tree | 8faef8a2465c71b2c948c81cbcc278fc439dfa18 /src/util/mq.c | |
parent | a4d4706ab21992e4ad58f8630b1ef49bd50816ce (diff) | |
download | gnunet-dd88153891b488a5ab54480ee2a10e45817ffd56.tar.gz gnunet-dd88153891b488a5ab54480ee2a10e45817ffd56.zip |
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.
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
335 | unsigned int | 335 | unsigned int |
336 | GNUNET_MQ_get_length (struct GNUNET_MQ_Handle *mq) | 336 | GNUNET_MQ_get_length (struct GNUNET_MQ_Handle *mq) |
337 | { | 337 | { |
338 | return mq->queue_length - (GNUNET_YES == mq->in_flight) ? 1 : 0; | 338 | if (GNUNET_YES != mq->in_flight) |
339 | { | ||
340 | return mq->queue_length; | ||
341 | } | ||
342 | return mq->queue_length - 1; | ||
339 | } | 343 | } |
340 | 344 | ||
341 | 345 | ||