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
test dict before giving its size...
[simgrid.git]
/
src
/
xbt
/
dict.c
diff --git
a/src/xbt/dict.c
b/src/xbt/dict.c
index
01b1302
..
b9079c6
100644
(file)
--- a/
src/xbt/dict.c
+++ b/
src/xbt/dict.c
@@
-89,7
+89,7
@@
void xbt_dict_free(xbt_dict_t * dict)
*/
XBT_INLINE unsigned int xbt_dict_size(xbt_dict_t dict)
{
*/
XBT_INLINE unsigned int xbt_dict_size(xbt_dict_t dict)
{
- return
dict->count
;
+ return
(dict ? (unsigned int) dict->count : (unsigned int) 0)
;
}
/**
}
/**
@@
-642,7
+642,7
@@
void xbt_dict_dump_output_string(void *s)
*/
XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
{
*/
XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
{
- return (xbt_dict_
length
(dict) == 0);
+ return (xbt_dict_
size
(dict) == 0);
}
/**
}
/**