1
0
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:
H1ghBre4k3r 2021-05-03 21:28:12 +02:00 committed by Patrick Rathje
parent dd2f0a1265
commit 0f2307e668

View File

@ -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);