ds: dict: fix iterable_begin not setting iterator status
This commit is contained in:
@@ -495,6 +495,7 @@ static b_iterator *iterable_begin(b_dict *dict)
|
||||
if (dict_is_empty(it->_d_p)) {
|
||||
it->item.key = NULL;
|
||||
it->item.value = NULL;
|
||||
b_iterator_set_status(it_obj, B_ERR_NO_DATA);
|
||||
return it_obj;
|
||||
}
|
||||
|
||||
@@ -504,6 +505,7 @@ static b_iterator *iterable_begin(b_dict *dict)
|
||||
if (!first_bucket) {
|
||||
it->item.key = NULL;
|
||||
it->item.value = NULL;
|
||||
b_iterator_set_status(it_obj, B_ERR_NO_DATA);
|
||||
return it_obj;
|
||||
}
|
||||
|
||||
@@ -513,6 +515,7 @@ static b_iterator *iterable_begin(b_dict *dict)
|
||||
if (!first_item) {
|
||||
it->item.key = NULL;
|
||||
it->item.value = NULL;
|
||||
b_iterator_set_status(it_obj, B_ERR_NO_DATA);
|
||||
return it_obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user