fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 18 Jan 2010 16:09:38 +0000 (16:09 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 18 Jan 2010 16:09:38 +0000 (16:09 +0000)
src/topology/gnunet-daemon-topology.c

index 407bea4a04c7bdd507f78c62d8170addea3617eb..3c29c229deaea7da9c7b86364b178cc286800ccf 100644 (file)
@@ -462,20 +462,19 @@ free_peer (struct PeerList *peer)
 {
   struct PeerList *pos;
   struct PeerList *prev;
-  struct PeerList *next;
   
   prev = NULL;
-  next = peers;
-  while (peer != (pos = next))
+  pos = peers;
+  while (peer != pos)
     {
-      next = pos->next;
       prev = pos;
+      pos = pos->next;
     }
   GNUNET_assert (pos != NULL);
    if (prev == NULL)
-     peers = next;
+     peers = pos->next;
    else
-     prev->next = next;
+     prev->next = pos->next;
    if (pos->hello_req != NULL)
      GNUNET_CORE_notify_transmit_ready_cancel (pos->hello_req);
    if (pos->connect_req != NULL)