Ignore:
Timestamp:
2013-09-10T16:32:35Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4982d87
Parents:
e8d6ce2
Message:

Simplify use of list_foreach.

File:
1 edited

Legend:

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

    re8d6ce2 rfeeac0d  
    118118         * Make sure the command is not already listed.
    119119         */
    120         list_foreach(cmd_list, cur) {
    121                 cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link);
    122                
     120        list_foreach(cmd_list, link, cmd_info_t, hlp) {
    123121                if (hlp == cmd) {
    124122                        /* The command is already there. */
     
    612610        cmd_info_t *cmd = NULL;
    613611       
    614         list_foreach(cmd_list, cur) {
    615                 cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link);
     612        list_foreach(cmd_list, link, cmd_info_t, hlp) {
    616613                spinlock_lock(&hlp->lock);
    617614               
Note: See TracChangeset for help on using the changeset viewer.