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
  • uspace/srv/fs/exfat/exfat_directory.c

    r3061bc1 ra35b458  
    9191{
    9292        errno_t rc = EOK;
    93        
     93
    9494        if (di->b) {
    9595                rc = block_put(di->b);
    9696                di->b = NULL;
    9797        }
    98        
     98
    9999        return rc;
    100100}
     
    141141        if (rc != EOK)
    142142                di->pos -= 1;
    143        
     143
    144144        return rc;
    145145}
     
    148148{
    149149        errno_t rc = EOK;
    150        
     150
    151151        if (di->pos > 0) {
    152152                di->pos -= 1;
     
    154154        } else
    155155                return ENOENT;
    156        
     156
    157157        if (rc != EOK)
    158158                di->pos += 1;
    159        
     159
    160160        return rc;
    161161}
     
    170170        if (rc != EOK)
    171171                di->pos = _pos;
    172        
     172
    173173        return rc;
    174174}
     
    177177{
    178178        errno_t rc;
    179        
     179
    180180        rc = exfat_directory_block_load(di);
    181181        if (rc == EOK) {
     
    183183                *d = ((exfat_dentry_t *)di->b->data) + o;
    184184        }
    185        
     185
    186186        return rc;
    187187}
     
    197197                        return ENOENT;
    198198        } while (exfat_directory_next(di) == EOK);
    199        
     199
    200200        return ENOENT;
    201201}
     
    222222        size_t offset = 0;
    223223        aoff64_t start_pos = 0;
    224        
     224
    225225        rc = exfat_directory_find(di, EXFAT_DENTRY_FILE, &d);
    226226        if (rc != EOK)
     
    238238                return ENOENT;
    239239        *ds  = d->stream;
    240        
     240
    241241        if (ds->name_size > size)
    242242                return EOVERFLOW;
     
    470470                di->b->dirty = true;
    471471        }
    472        
     472
    473473        return exfat_directory_seek(di, pos);
    474474}
     
    486486                return rc;
    487487        count = de->file.count + 1;
    488        
     488
    489489        while (count) {
    490490                rc = exfat_directory_get(di, &de);
     
    517517        di->nodep->dirty = true;                /* need to sync node */
    518518        di->blocks = di->nodep->size / BPS(di->bs);
    519        
     519
    520520        return EOK;
    521521}
Note: See TracChangeset for help on using the changeset viewer.