Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/list.h

    rdf13836 r1023758  
    7676#define list_foreach(list, member, itype, iterator) \
    7777        for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \
    78             for (link_t *_link = (list).head.next; \
    79             iterator = list_get_instance(_link, itype, member), \
    80             _link != &(list).head; _link = _link->next)
     78                for (link_t *_link = (list).head.next; \
     79                    iterator = list_get_instance(_link, itype, member), \
     80                    _link != &(list).head; _link = _link->next)
    8181
    8282#define list_foreach_rev(list, member, itype, iterator) \
    8383        for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \
    84             for (link_t *_link = (list).head.prev; \
    85             iterator = list_get_instance(_link, itype, member), \
    86             _link != &(list).head; _link = _link->prev)
     84                for (link_t *_link = (list).head.prev; \
     85                    iterator = list_get_instance(_link, itype, member), \
     86                    _link != &(list).head; _link = _link->prev)
    8787
    8888/** Unlike list_foreach(), allows removing items while traversing a list.
     
    113113#define list_foreach_safe(list, iterator, next_iter) \
    114114        for (link_t *iterator = (list).head.next, \
    115                 *next_iter = iterator->next; \
    116                 iterator != &(list).head; \
    117                 iterator = next_iter, next_iter = iterator->next)
     115            *next_iter = iterator->next; \
     116            iterator != &(list).head; \
     117            iterator = next_iter, next_iter = iterator->next)
    118118
    119119       
Note: See TracChangeset for help on using the changeset viewer.