Changeset 3781092 in mainline for uspace/lib/c/include/adt/list.h


Ignore:
Timestamp:
2011-09-09T18:22:33Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40a2af3
Parents:
980671e7 (diff), 5da7199 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/list.h

    r980671e7 r3781092  
    7272
    7373#define assert_link_not_used(link) \
    74         assert((link)->prev == NULL && (link)->next == NULL)
     74        assert(((link)->prev == NULL) && ((link)->next == NULL))
    7575
    7676/** Initialize doubly-linked circular list link
     
    158158static inline void list_remove(link_t *link)
    159159{
    160         link->next->prev = link->prev;
    161         link->prev->next = link->next;
     160        if ((link->prev != NULL) && (link->next != NULL)) {
     161                link->next->prev = link->prev;
     162                link->prev->next = link->next;
     163        }
     164       
    162165        link_initialize(link);
    163166}
Note: See TracChangeset for help on using the changeset viewer.