Add braces to avoid ambiguity in a nested conditional (silences a gcc
warning).
This commit is contained in:
parent
d08ae64b1d
commit
69f2cf17a3
@ -766,7 +766,7 @@ getloginname()
|
||||
if (p < nbuf + (NBUFSIZ - 1))
|
||||
*p++ = ch;
|
||||
}
|
||||
if (p > nbuf)
|
||||
if (p > nbuf) {
|
||||
if (nbuf[0] == '-')
|
||||
(void)fprintf(stderr,
|
||||
"login names may not start with '-'.\n");
|
||||
@ -775,6 +775,7 @@ getloginname()
|
||||
username = nbuf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user