Changeset 0c01270 in mainline for uspace/lib/conf/src/ini.c


Ignore:
Timestamp:
2020-07-05T21:00:33Z (4 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
0f75a63
Parents:
a81a950d
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-05-08 11:02:56)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-07-05 21:00:33)
Message:

libconf: Fix iterator behavior, fix config error notification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/conf/src/ini.c

    ra81a950d r0c01270  
    489489bool ini_item_iterator_valid(ini_item_iterator_t *iterator)
    490490{
    491         bool empty = (iterator->cur_item != NULL);
    492         bool looped = (iterator->cur_item == iterator->first_item);
    493         return empty || (looped && iterator->incremented);
     491        bool empty = (iterator->cur_item == NULL);
     492        bool maybe_looped = (iterator->cur_item == iterator->first_item);
     493        return !(empty || (maybe_looped && iterator->incremented));
    494494}
    495495
Note: See TracChangeset for help on using the changeset viewer.