Changeset a35b458 in mainline for kernel/generic/src/adt/list.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/adt/list.c

    r3061bc1 ra35b458  
    5656        bool found = false;
    5757        link_t *hlp = list->head.next;
    58        
     58
    5959        while (hlp != &list->head) {
    6060                if (hlp == link) {
     
    6464                hlp = hlp->next;
    6565        }
    66        
     66
    6767        return found;
    6868}
     
    8080        if (list_empty(list))
    8181                return;
    82        
     82
    8383        /* Attach list to destination. */
    8484        list->head.next->prev = pos;
    8585        list->head.prev->next = pos->next;
    86        
     86
    8787        /* Link destination list to the added list. */
    8888        pos->next->prev = list->head.prev;
    8989        pos->next = list->head.next;
    90        
     90
    9191        list_initialize(list);
    9292}
     
    102102{
    103103        unsigned long count = 0;
    104        
     104
    105105        link_t *link = list_first(list);
    106106        while (link != NULL) {
     
    108108                link = list_next(link, list);
    109109        }
    110        
     110
    111111        return count;
    112112}
Note: See TracChangeset for help on using the changeset viewer.