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
Don't bother emptying empty dicts in dict_reset
[simgrid.git]
/
src
/
xbt
/
dict.c
diff --git
a/src/xbt/dict.c
b/src/xbt/dict.c
index
a51a2ab
..
07c5945
100644
(file)
--- a/
src/xbt/dict.c
+++ b/
src/xbt/dict.c
@@
-368,6
+368,10
@@
void xbt_dict_reset(xbt_dict_t dict) {
int i;
xbt_dictelm_t current, previous = NULL;
int i;
xbt_dictelm_t current, previous = NULL;
+
+ if (dict->count == 0)
+ return;
+
for (i = 0; i < dict->table_size; i++) {
current = dict->table[i];
while (current != NULL) {
for (i = 0; i < dict->table_size; i++) {
current = dict->table[i];
while (current != NULL) {