Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Does not fix any particular bug but a lame cut & paste from its head counterpart.
authorArnaud Legrand <arnaud.legrand@imag.fr>
Mon, 19 Mar 2012 12:58:13 +0000 (13:58 +0100)
committerArnaud Legrand <arnaud.legrand@imag.fr>
Mon, 19 Mar 2012 13:10:31 +0000 (14:10 +0100)
src/xbt/swag.c

index 70a8f08..dcee5ef 100644 (file)
@@ -100,7 +100,7 @@ XBT_INLINE void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
     swag->tail = obj;
     swag->count++;
   }
     swag->tail = obj;
     swag->count++;
   }
-  else if (obj != swag->head && !xbt_swag_getPrev(obj, swag->offset)) {
+  else if (obj != swag->tail && !xbt_swag_getNext(obj, swag->offset)) {
     xbt_swag_getPrev(obj, swag->offset) = swag->tail;
     xbt_swag_getNext(swag->tail, swag->offset) = obj;
     swag->tail = obj;
     xbt_swag_getPrev(obj, swag->offset) = swag->tail;
     xbt_swag_getNext(swag->tail, swag->offset) = obj;
     swag->tail = obj;