Changeset a35b458 in mainline for uspace/lib/c/generic/adt/list.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/list.c
r3061bc1 ra35b458 57 57 bool found = false; 58 58 link_t *hlp = list->head.next; 59 59 60 60 while (hlp != &list->head) { 61 61 if (hlp == link) { … … 65 65 hlp = hlp->next; 66 66 } 67 67 68 68 return found; 69 69 } … … 81 81 if (list_empty(list)) 82 82 return; 83 83 84 84 /* Attach list to destination. */ 85 85 list->head.next->prev = pos; 86 86 list->head.prev->next = pos->next; 87 87 88 88 /* Link destination list to the added list. */ 89 89 pos->next->prev = list->head.prev; 90 90 pos->next = list->head.next; 91 91 92 92 list_initialize(list); 93 93 } … … 103 103 { 104 104 unsigned long count = 0; 105 105 106 106 link_t *link = list_first(list); 107 107 while (link != NULL) { … … 109 109 link = list_next(link, list); 110 110 } 111 111 112 112 return count; 113 113 }
Note:
See TracChangeset
for help on using the changeset viewer.