Ignore:
Timestamp:
2018-03-02T20:10:49Z (6 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/genarch/src/multiboot/multiboot.c

    r3061bc1 ra35b458  
    5252        if (end == NULL)
    5353                end = cmd_line + str_size(cmd_line);
    54        
     54
    5555        /*
    5656         * Find last occurence of '/' before 'end'. If found, place start at
     
    5959        const char *cp = end;
    6060        const char *start = buf;
    61        
     61
    6262        while (cp != start) {
    6363                if (*cp == '/') {
     
    6767                cp--;
    6868        }
    69        
     69
    7070        /* Copy the command. */
    7171        str_ncpy(buf, size, start, (size_t) (end - start));
     
    106106                if (init.cnt >= CONFIG_INIT_TASKS)
    107107                        break;
    108                
     108
    109109                init.tasks[init.cnt].paddr = mods[i].start;
    110110                init.tasks[init.cnt].size = mods[i].end - mods[i].start;
    111                
     111
    112112                /* Copy command line, if available. */
    113113                if (mods[i].string) {
     
    120120                        init.tasks[init.cnt].arguments[0] = 0;
    121121                }
    122                
     122
    123123                init.cnt++;
    124124        }
     
    128128{
    129129        uint32_t pos = 0;
    130        
     130
    131131        while ((pos < length) && (e820counter < MEMMAP_E820_MAX_RECORDS)) {
    132132                e820table[e820counter] = memmap->mm_info;
    133                
     133
    134134                /* Compute address of next structure. */
    135135                uint32_t size = sizeof(memmap->size) + memmap->size;
    136136                memmap = (multiboot_memmap_t *) ((uintptr_t) memmap + size);
    137137                pos += size;
    138                
     138
    139139                e820counter++;
    140140        }
     
    163163                multiboot_modules(info->mods_count,
    164164                    (multiboot_module_t *) MULTIBOOT_PTR(info->mods_addr));
    165        
     165
    166166        /* Copy memory map. */
    167167        if ((info->flags & MULTIBOOT_INFO_FLAGS_MMAP) != 0)
Note: See TracChangeset for help on using the changeset viewer.