Changeset a35b458 in mainline for kernel/generic/src/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
-
kernel/generic/src/adt/list.c
r3061bc1 ra35b458 56 56 bool found = false; 57 57 link_t *hlp = list->head.next; 58 58 59 59 while (hlp != &list->head) { 60 60 if (hlp == link) { … … 64 64 hlp = hlp->next; 65 65 } 66 66 67 67 return found; 68 68 } … … 80 80 if (list_empty(list)) 81 81 return; 82 82 83 83 /* Attach list to destination. */ 84 84 list->head.next->prev = pos; 85 85 list->head.prev->next = pos->next; 86 86 87 87 /* Link destination list to the added list. */ 88 88 pos->next->prev = list->head.prev; 89 89 pos->next = list->head.next; 90 90 91 91 list_initialize(list); 92 92 } … … 102 102 { 103 103 unsigned long count = 0; 104 104 105 105 link_t *link = list_first(list); 106 106 while (link != NULL) { … … 108 108 link = list_next(link, list); 109 109 } 110 110 111 111 return count; 112 112 }
Note:
See TracChangeset
for help on using the changeset viewer.