MinGW
[oweals/gnunet.git] / src / util / peer.c
index 2ad4b3d671d82ef71efb5aa37400785e4499aed7..5c00d5580e7cc1ccb53f85cb55607671958904c3 100644 (file)
 struct PeerEntry
 {
   /**
-   * the identifier itself
+   * The identifier itself
    */
   struct GNUNET_PeerIdentity id;
 
   /**
-   * Short version of the identifier;
-   * if the RC==0, then index of next
-   * free slot in table, otherwise 
-   * equal to this slot in the table. 
+   * Short version of the identifier; if the RC==0, then index of next
+   * free slot in table, otherwise equal to this slot in the table.
    */
   GNUNET_PEER_Id pid;
 
   /**
-   * Reference counter, 0 if this slot
-   * is not used.
+   * Reference counter, 0 if this slot is not used.
    */
   unsigned int rc;
 };
@@ -144,6 +141,8 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id * ids, unsigned int count)
   for (i = count - 1; i >= 0; i--)
     {
       id = ids[i];
+      if (id == 0)
+       continue;
       GNUNET_assert (id < size);
       GNUNET_assert (table[id].rc > 0);
       table[id].rc--;