Sfoglia il codice sorgente

added return if adding to an empty list, otherwise we mess with list order

tarfeef101 6 anni fa
parent
commit
30ad8a2702
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      kern/synchprobs/traffic_synch.c

+ 1 - 0
kern/synchprobs/traffic_synch.c

@@ -84,6 +84,7 @@ static void push(car * newcar)
   {
     active->front = newcar;
     active->back = newcar;
+    return;
   }
   
   active->back->next = newcar;