diff options
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 193823c93b..cb380de430 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; } |