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
Add the trace library and fixed a few source of potential bugs in heap.
[simgrid.git]
/
include
/
xbt
/
swag.h
diff --git
a/include/xbt/swag.h
b/include/xbt/swag.h
index
a834d74
..
c235387
100644
(file)
--- a/
include/xbt/swag.h
+++ b/
include/xbt/swag.h
@@
-8,7
+8,8
@@
what you are doing. */
/* This type should be added to a type that is to be used in such a swag */
what you are doing. */
/* This type should be added to a type that is to be used in such a swag */
-/* Whenever a new object with this struct is created, all fields have to be swag to NULL */
+/* Whenever a new object with this struct is created, all fields have
+ to be set to NULL */
typedef struct xbt_swag_hookup {
void *next;
typedef struct xbt_swag_hookup {
void *next;
@@
-40,6
+41,6
@@
static __inline__ void *xbt_swag_getFirst(xbt_swag_t swag)
#define xbt_swag_offset(var,field) ((char *)&( (var).field ) - (char *)&(var))
#define xbt_swag_foreach(obj,swag) \
#define xbt_swag_offset(var,field) ((char *)&( (var).field ) - (char *)&(var))
#define xbt_swag_foreach(obj,swag) \
- for((obj)=xbt_swag_getFirst((swag));
\
+ for((obj)=xbt_swag_getFirst((swag)); \
(obj)!=NULL; \
(obj)=xbt_swag_getNext((obj),(swag)->offset))
(obj)!=NULL; \
(obj)=xbt_swag_getNext((obj),(swag)->offset))