From: alegrand Date: Wed, 22 Dec 2004 20:17:22 +0000 (+0000) Subject: How can I have ever wrote such a thing ! X-Git-Tag: v3.3~4657 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1819c24ee15d55baeb26ead0ae4ddef7cf6679d7?ds=inline How can I have ever wrote such a thing ! git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@693 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/fifo.c b/src/xbt/fifo.c index 3084fa7e03..d83903296b 100644 --- a/src/xbt/fifo.c +++ b/src/xbt/fifo.c @@ -58,8 +58,8 @@ void *xbt_fifo_pop(xbt_fifo_t l) xbt_fifo_item_t item; void *content; - item = xbt_fifo_pop_item(l); - if(item==NULL) return NULL; + if(l==NULL) return NULL; + if(!(item = xbt_fifo_pop_item(l))) return NULL; content = item->content; xbt_fifo_freeitem(item); @@ -89,9 +89,9 @@ void *xbt_fifo_shift(xbt_fifo_t l) xbt_fifo_item_t item; void *content; - item = xbt_fifo_shift_item(l); if(l==NULL) return NULL; - + if(!(item = xbt_fifo_shift_item(l))) return NULL; + content = item->content; xbt_fifo_freeitem(item); return content;