[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r38218 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r38218 - gnunet/src/util |
Date: |
Wed, 26 Oct 2016 20:11:28 +0200 |
Author: amatus
Date: 2016-10-26 20:11:27 +0200 (Wed, 26 Oct 2016)
New Revision: 38218
Modified:
gnunet/src/util/mq.c
Log:
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.
Modified: gnunet/src/util/mq.c
===================================================================
--- gnunet/src/util/mq.c 2016-10-26 15:56:48 UTC (rev 38217)
+++ gnunet/src/util/mq.c 2016-10-26 18:11:27 UTC (rev 38218)
@@ -335,7 +335,11 @@
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;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r38218 - gnunet/src/util,
gnunet <=