Ignore:
Timestamp:
2020-07-06T22:58:19Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37d4c91, ee2f0beb
Parents:
762f989
Message:

Avoid most cases of direct used of list_t.prev/next in kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/kconsole.c

    r762f989 r583c2a3  
    172172
    173173        if (*startpos == NULL)
    174                 *startpos = cmd_list.head.next;
    175 
    176         for (; *startpos != &cmd_list.head; *startpos = (*startpos)->next) {
     174                *startpos = list_first(&cmd_list);
     175
     176        for (; *startpos != NULL; *startpos = list_next(*startpos, &cmd_list)) {
    177177                cmd_info_t *hlp = list_get_instance(*startpos, cmd_info_t, link);
    178178
     
    182182
    183183                if (str_lcmp(curname, name, namelen) == 0) {
    184                         *startpos = (*startpos)->next;
     184                        *startpos = list_next(*startpos, &cmd_list);
    185185                        if (h)
    186186                                *h = hlp->description;
Note: See TracChangeset for help on using the changeset viewer.