Code cleanups
authorAndreas Tonnesen <andreto@olsr.org>
Sat, 18 Sep 2004 23:40:33 +0000 (23:40 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Sat, 18 Sep 2004 23:40:33 +0000 (23:40 +0000)
src/neighbor_table.c
src/two_hop_neighbor_table.c

index cffa78d..c3a3377 100644 (file)
@@ -71,8 +71,6 @@ olsr_delete_neighbor_2_pointer(struct neighbor_entry *neighbor, union olsr_ip_ad
        {
          /* Dequeue */
          DEQUEUE_ELEM(entry);
-         //entry->prev->next = entry->next;
-         //entry->next->prev = entry->prev;
          /* Delete */
          free(entry);
          return 1;       
@@ -167,8 +165,6 @@ olsr_delete_neighbor_table(union olsr_ip_addr *neighbor_addr)
       if(two_hop_entry->neighbor_2_pointer < 1)
        {
          DEQUEUE_ELEM(two_hop_entry);
-         //two_hop_entry->prev->next = two_hop_entry->next;
-         //two_hop_entry->next->prev = two_hop_entry->prev;
 
          free(two_hop_entry);
        }
@@ -184,8 +180,6 @@ olsr_delete_neighbor_table(union olsr_ip_addr *neighbor_addr)
 
   /* Dequeue */
   DEQUEUE_ELEM(entry);
-  //entry->prev->next = entry->next;
-  //entry->next->prev = entry->prev;
 
   free(entry);
 
@@ -239,13 +233,6 @@ olsr_insert_neighbor_table(union olsr_ip_addr *main_addr)
 
   /* Queue */
   QUEUE_ELEM(neighbortable[hash], new_neigh);
-  
-  /*
-  neighbortable[hash].next->prev = new_neigh;
-  new_neigh->next = neighbortable[hash].next;
-  new_neigh->prev = &neighbortable[hash];
-  neighbortable[hash].next = new_neigh;
-  */
 
   return new_neigh;
 }
@@ -406,10 +393,9 @@ olsr_time_out_two_hop_neighbors(struct neighbor_entry  *neighbor)
 
          if(two_hop_entry->neighbor_2_pointer < 1)
            {
-             /* FIX THIS */
+             /* FIX THIS (fix what?)*/
              DEQUEUE_ELEM(two_hop_entry);
-             //two_hop_entry->prev->next = two_hop_entry->next;
-             //two_hop_entry->next->prev = two_hop_entry->prev;
+
              free((void *)two_hop_entry);
            }
 
@@ -419,9 +405,6 @@ olsr_time_out_two_hop_neighbors(struct neighbor_entry  *neighbor)
          /* Dequeue */
          DEQUEUE_ELEM(two_hop_to_delete);
 
-         //two_hop_to_delete->prev->next = two_hop_to_delete->next;
-         //two_hop_to_delete->next->prev = two_hop_to_delete->prev;
-
          free(two_hop_to_delete);
 
          /* This flag is set to UP to recalculate the MPR set and the routing table*/
index 8eb67bc..42722b0 100644 (file)
@@ -73,8 +73,6 @@ olsr_delete_neighbor_pointer(struct neighbor_2_entry *two_hop_entry, union olsr_
 
         /* dequeue */
         DEQUEUE_ELEM(entry_to_delete);
-        //entry_to_delete->prev->next = entry_to_delete->next;
-        //entry_to_delete->next->prev = entry_to_delete->prev;
 
         free(entry_to_delete);
        }
@@ -118,8 +116,6 @@ olsr_delete_two_hop_neighbor_table(struct neighbor_2_entry *two_hop_neighbor)
   
   /* dequeue */
   DEQUEUE_ELEM(two_hop_neighbor);
-  //two_hop_neighbor->prev->next = two_hop_neighbor->next;
-  //two_hop_neighbor->next->prev = two_hop_neighbor->prev;
   
   free(two_hop_neighbor);
 }
@@ -144,12 +140,6 @@ olsr_insert_two_hop_neighbor_table(struct neighbor_2_entry *two_hop_neighbor)
 
   /* Queue */  
   QUEUE_ELEM(two_hop_neighbortable[hash], two_hop_neighbor);
-  /*
-  two_hop_neighbortable[hash].next->prev = two_hop_neighbor;
-  two_hop_neighbor->next = two_hop_neighbortable[hash].next;
-  two_hop_neighbortable[hash].next = two_hop_neighbor;
-  two_hop_neighbor->prev = &two_hop_neighbortable[hash];
-  */
 }