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
Bug fix and add a xbt_swag_foreach_safe where you can remove objects from
[simgrid.git]
/
src
/
xbt
/
swag.c
diff --git
a/src/xbt/swag.c
b/src/xbt/swag.c
index
dc09977
..
42e70fd
100644
(file)
--- a/
src/xbt/swag.c
+++ b/
src/xbt/swag.c
@@
-57,7
+57,7
@@
void *xbt_swag_extract(void *obj, xbt_swag_t swag)
{
size_t offset = swag->offset;
- if (
!obj
)
+ if (
(!obj) || (!swag)
)
return NULL;
if(!xbt_swag_belongs(obj, swag)) /* Trying to remove an object that
was not in this swag */