diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2018-06-16 21:07:46 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2018-06-16 21:07:46 +0000 |
commit | 943a127c89801ea40eb3c8417ccc4b931b73d01f (patch) | |
tree | 5472e7ebe1d93217827c653459ba98c9262e2638 /usr.bin/units | |
parent | a0d7de3b114c0819ce0921c10fb5bdaf2ee9976a (diff) | |
download | src-943a127c89801ea40eb3c8417ccc4b931b73d01f.tar.gz src-943a127c89801ea40eb3c8417ccc4b931b73d01f.zip |
units: fix some nits
- prefer braces to abusing the `,` operator
- mark dead function as dead
- remove dead break
Notes
Notes:
svn path=/head/; revision=335265
Diffstat (limited to 'usr.bin/units')
-rw-r--r-- | usr.bin/units/units.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index 4499d9f3a081..e0365cf34283 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -625,8 +625,10 @@ compareproducts(char **one, char **two) two++; else if (strcmp(*one, *two)) return 1; - else - one++, two++; + else { + one++; + two++; + } } return 0; } @@ -726,7 +728,7 @@ showanswer(struct unittype * have, struct unittype * want) } -static void +static void __dead2 usage(void) { fprintf(stderr, @@ -805,7 +807,6 @@ main(int argc, char **argv) else printf("Units data file not found"); exit(0); - break; case 'h': /* FALLTHROUGH */ |