diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-18 13:40:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-18 13:40:19 +0000 |
commit | 6fc671e8b19c77baca0cefee1eee5dea722f5d2c (patch) | |
tree | 64b8ac3a3eedf33a1cc2c5d2409f76528f3312bc /src/dht/gnunet-service-dht_neighbours.c | |
parent | ad91280a3f21f030501918d5fef92f05d5c066f2 (diff) | |
download | gnunet-6fc671e8b19c77baca0cefee1eee5dea722f5d2c.tar.gz gnunet-6fc671e8b19c77baca0cefee1eee5dea722f5d2c.zip |
work around bogus cc warning -- for some C compilers...
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 22 |
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) | |||
824 | memcpy (&cbuf[off], pending->msg, msize); | 824 | memcpy (&cbuf[off], pending->msg, msize); |
825 | off += msize; | 825 | off += msize; |
826 | peer->pending_count--; | 826 | peer->pending_count--; |
827 | GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); | 827 | GNUNET_CONTAINER_DLL_remove (peer->head, |
828 | peer->tail, | ||
829 | pending); | ||
828 | GNUNET_free (pending); | 830 | GNUNET_free (pending); |
829 | } | 831 | } |
830 | if (peer->head != NULL) | 832 | if (NULL != (pending = peer->head)) |
831 | { | 833 | { |
834 | /* technically redundant, but easier to read and | ||
835 | avoids bogus gcc warning... */ | ||
836 | msize = ntohs (pending->msg->size); | ||
832 | peer->th = | 837 | peer->th = |
833 | GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, | 838 | GNUNET_CORE_notify_transmit_ready (core_api, |
834 | GNUNET_CORE_PRIO_BEST_EFFORT, | 839 | GNUNET_NO, |
835 | GNUNET_TIME_absolute_get_remaining | 840 | GNUNET_CORE_PRIO_BEST_EFFORT, |
836 | (pending->timeout), &peer->id, msize, | 841 | GNUNET_TIME_absolute_get_remaining (pending->timeout), |
837 | &core_transmit_notify, peer); | 842 | &peer->id, |
843 | msize, | ||
844 | &core_transmit_notify, | ||
845 | peer); | ||
838 | GNUNET_break (NULL != peer->th); | 846 | GNUNET_break (NULL != peer->th); |
839 | } | 847 | } |
840 | return off; | 848 | return off; |