Permalink
Browse files

Add explicit braces to nested `if` statements.

  • Loading branch information...
1 parent 5a5c8dd commit 5777fffd298a9359a9929cfb059ae4379d85f902 @jonm committed Oct 10, 2015
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/comm.c
View
@@ -156,15 +156,18 @@ int main (int argc, char **argv)
pos++;
}
- if (pos < argc)
- if (!isdigit(*argv[pos])) {
+ if (pos < argc) {
+ if (!isdigit(*argv[pos])) {
fprintf(stderr, "Usage: %s [-l] [-s] [-d pathname] [ port # ]\n",
argv[0]);
assert(0);
- } else if ((port = atoi(argv[pos])) <= 1024) {
- printf("Illegal port #\n");
- assert(0);
+ } else {
+ if ((port = atoi(argv[pos])) <= 1024) {
+ printf("Illegal port #\n");
+ assert(0);
+ }
}
+ }
Uptime = time(0);

0 comments on commit 5777fff

Please sign in to comment.