From: Christian Grothoff Date: Tue, 31 Jan 2017 16:41:09 +0000 (+0100) Subject: fix lower_rung() logic X-Git-Tag: taler-0.2.1~214 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0782694edb983228127c3ce521a9bec0c6b4ec41;p=oweals%2Fgnunet.git fix lower_rung() logic --- diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index bb33dac40..70d0cb83e 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c @@ -278,15 +278,11 @@ lower_rung (struct RouteDirection *dir) rung->prev, prev); } - else - { - rung = prev; - } - GNUNET_assert (NULL != rung); - GNUNET_CONTAINER_DLL_insert (rung->rd_head, - rung->rd_tail, + GNUNET_assert (NULL != prev); + GNUNET_CONTAINER_DLL_insert (prev->rd_head, + prev->rd_tail, dir); - dir->rung = rung; + dir->rung = prev; }