mirror of
https://github.com/CovidBraceletPrj/CovidBracelet.git
synced 2025-01-08 04:14:25 +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) {
|
||||
if (iter->finished) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
record_t* next = NULL;
|
||||
|
||||
// What is this?
|
||||
while (next == NULL) {
|
||||
while (next == NULL && !iter->finished) {
|
||||
record_t contact;
|
||||
// try to load the next contact
|
||||
int res = load_contact(&contact, iter->sn_next);
|
||||
|
Loading…
x
Reference in New Issue
Block a user