units: fix some nits

- prefer braces to abusing the `,` operator
- mark dead function as dead
- remove dead break
This commit is contained in:
Eitan Adler 2018-06-16 21:07:46 +00:00
parent a0d7de3b11
commit 943a127c89
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335265

View File

@ -625,8 +625,10 @@ compareproducts(char **one, char **two)
two++; two++;
else if (strcmp(*one, *two)) else if (strcmp(*one, *two))
return 1; return 1;
else else {
one++, two++; one++;
two++;
}
} }
return 0; return 0;
} }
@ -726,7 +728,7 @@ showanswer(struct unittype * have, struct unittype * want)
} }
static void static void __dead2
usage(void) usage(void)
{ {
fprintf(stderr, fprintf(stderr,
@ -805,7 +807,6 @@ main(int argc, char **argv)
else else
printf("Units data file not found"); printf("Units data file not found");
exit(0); exit(0);
break;
case 'h': case 'h':
/* FALLTHROUGH */ /* FALLTHROUGH */