A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I probably had been drinking too much the day I have written this command... Sorry...
[simgrid.git]
/
src
/
xbt
/
fifo.c
diff --git
a/src/xbt/fifo.c
b/src/xbt/fifo.c
index
3084fa7
..
d839032
100644
(file)
--- 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;
xbt_fifo_item_t item;
void *content;
- i
tem = xbt_fifo_pop_item(l)
;
- if(
item==NULL
) return NULL;
+ i
f(l==NULL) return NULL
;
+ if(
!(item = xbt_fifo_pop_item(l))
) return NULL;
content = item->content;
xbt_fifo_freeitem(item);
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;
xbt_fifo_item_t item;
void *content;
- item = xbt_fifo_shift_item(l);
if(l==NULL) return NULL;
if(l==NULL) return NULL;
-
+ if(!(item = xbt_fifo_shift_item(l))) return NULL;
+
content = item->content;
xbt_fifo_freeitem(item);
return content;
content = item->content;
xbt_fifo_freeitem(item);
return content;