Fix dict traversal
This commit is contained in:
parent
dc55a7fc6c
commit
5754c383a6
1 changed files with 7 additions and 1 deletions
|
@ -76,13 +76,19 @@ static int bucket_each_slot(int level, patty_dict_bucket *bucket, patty_dict_cal
|
|||
}
|
||||
|
||||
if (slot->next) {
|
||||
return bucket_each_slot(level+1, (patty_dict_bucket *)slot->next, callback, ctx);
|
||||
if (bucket_each_slot(level+1,
|
||||
(patty_dict_bucket *)slot->next,
|
||||
callback,
|
||||
ctx) < 0) {
|
||||
goto error_next_slot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error_callback:
|
||||
error_next_slot:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue