Ver Fonte

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

tarfeef101 há 6 anos atrás
pai
commit
30ad8a2702
1 ficheiros alterados com 1 adições e 0 exclusões
  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;