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/app/bdsh/cmds/modules/touch/touch.c

    r3061bc1 ra35b458  
    6969                    cmdname);
    7070        }
    71        
     71
    7272        return;
    7373}
     
    8585        int fd = -1;
    8686        char *buff = NULL;
    87        
     87
    8888        DIR *dirp;
    89        
     89
    9090        for (c = 0, optreset = 1, optind = 0, longind = 0; c != -1; ) {
    9191                c = getopt_long(argc, argv, "c", long_options, &longind);
     
    9696                }
    9797        }
    98        
     98
    9999        if (argc - optind < 1) {
    100100                printf("%s: Incorrect number of arguments. Try `help %s extended'\n",
     
    102102                return CMD_FAILURE;
    103103        }
    104        
     104
    105105        for (i = optind; argv[i] != NULL; i++) {
    106106                buff = str_dup(argv[i]);
     
    110110                        continue;
    111111                }
    112                
     112
    113113                dirp = opendir(buff);
    114114                if (dirp) {
     
    119119                        continue;
    120120                }
    121                
     121
    122122                /* Check whether file exists if -c (--no-create) option is given */
    123123                if ((!no_create) ||
     
    128128                        }
    129129                }
    130                
     130
    131131                if (fd < 0) {
    132132                        cli_error(CL_EFAIL, "Could not update or create `%s'", buff);
     
    138138                        fd = -1;
    139139                }
    140                
     140
    141141                free(buff);
    142142        }
    143        
     143
    144144        if (ret)
    145145                return CMD_FAILURE;
Note: See TracChangeset for help on using the changeset viewer.