mirror of
https://github.com/CovidBraceletPrj/CovidBracelet.git
synced 2025-01-09 12:44:24 +01:00
Records: In iterator_next, combine if-guard with while-loop
This commit is contained in:
parent
dd2f0a1265
commit
0f2307e668
@ -102,14 +102,9 @@ int ens_records_iterator_init_timerange(record_iterator_t* iterator, uint32_t* t
|
|||||||
}
|
}
|
||||||
|
|
||||||
record_t* ens_records_iterator_next(record_iterator_t* iter) {
|
record_t* ens_records_iterator_next(record_iterator_t* iter) {
|
||||||
if (iter->finished) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
record_t* next = NULL;
|
record_t* next = NULL;
|
||||||
|
|
||||||
// What is this?
|
while (next == NULL && !iter->finished) {
|
||||||
while (next == NULL) {
|
|
||||||
record_t contact;
|
record_t contact;
|
||||||
// try to load the next contact
|
// try to load the next contact
|
||||||
int res = load_contact(&contact, iter->sn_next);
|
int res = load_contact(&contact, iter->sn_next);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user