Explorar el Código

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

tarfeef101 hace 6 años
padre
commit
30ad8a2702
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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;