Changeset a35b458 in mainline for uspace/app/dnscfg/dnscfg.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
  • uspace/app/dnscfg/dnscfg.c

    r3061bc1 ra35b458  
    6363                return EINVAL;
    6464        }
    65        
     65
    6666        if (argc > 1) {
    6767                printf("%s: Too many arguments.\n", NAME);
     
    6969                return EINVAL;
    7070        }
    71        
     71
    7272        char *srv_addr  = argv[0];
    73        
     73
    7474        inet_addr_t addr;
    7575        errno_t rc = inet_addr_parse(srv_addr, &addr, NULL);
    76        
     76
    7777        if (rc != EOK) {
    7878                printf("%s: Invalid address format '%s'.\n", NAME, srv_addr);
    7979                return rc;
    8080        }
    81        
     81
    8282        rc = dnsr_set_srvaddr(&addr);
    8383        if (rc != EOK) {
     
    8686                return rc;
    8787        }
    88        
     88
    8989        return EOK;
    9090}
     
    9494        inet_addr_t addr;
    9595        inet_addr_any(&addr);
    96        
     96
    9797        errno_t rc = dnsr_set_srvaddr(&addr);
    9898        if (rc != EOK) {
     
    101101                return rc;
    102102        }
    103        
     103
    104104        return EOK;
    105105}
     
    113113                return rc;
    114114        }
    115        
     115
    116116        char *addr_str;
    117117        rc = inet_addr_format(&addr, &addr_str);
     
    120120                return rc;
    121121        }
    122        
     122
    123123        printf("Nameserver: %s\n", addr_str);
    124124        free(addr_str);
     
    139139                return 1;
    140140        }
    141        
     141
    142142        return 0;
    143143}
Note: See TracChangeset for help on using the changeset viewer.