summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-18 13:40:19 +0000
committerChristian Grothoff <christian@grothoff.org>2015-07-18 13:40:19 +0000
commit6fc671e8b19c77baca0cefee1eee5dea722f5d2c (patch)
tree64b8ac3a3eedf33a1cc2c5d2409f76528f3312bc
parentad91280a3f21f030501918d5fef92f05d5c066f2 (diff)
work around bogus cc warning -- for some C compilers...
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 49d7616dc..66a41bfb9 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -824,17 +824,25 @@ core_transmit_notify (void *cls, size_t size, void *buf)
memcpy (&cbuf[off], pending->msg, msize);
off += msize;
peer->pending_count--;
- GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending);
+ GNUNET_CONTAINER_DLL_remove (peer->head,
+ peer->tail,
+ pending);
GNUNET_free (pending);
}
- if (peer->head != NULL)
+ if (NULL != (pending = peer->head))
{
+ /* technically redundant, but easier to read and
+ avoids bogus gcc warning... */
+ msize = ntohs (pending->msg->size);
peer->th =
- GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO,
- GNUNET_CORE_PRIO_BEST_EFFORT,
- GNUNET_TIME_absolute_get_remaining
- (pending->timeout), &peer->id, msize,
- &core_transmit_notify, peer);
+ GNUNET_CORE_notify_transmit_ready (core_api,
+ GNUNET_NO,
+ GNUNET_CORE_PRIO_BEST_EFFORT,
+ GNUNET_TIME_absolute_get_remaining (pending->timeout),
+ &peer->id,
+ msize,
+ &core_transmit_notify,
+ peer);
GNUNET_break (NULL != peer->th);
}
return off;