mined: fix dangling else
Add braces to avoid ambiguity. Resolves the following warning: mined1.c:1355:5: warning: add explicit braces to avoid dangling else [-Wdangling-else] Change-Id: I64e2942835e45869010f0b8bbef2fe880d0852dc
This commit is contained in:
parent
38bb8cec91
commit
7ebdb97a28
1 changed files with 4 additions and 3 deletions
|
@ -1349,13 +1349,14 @@ int get_line(int fd, register char *buffer)
|
|||
if (read_chars <= 0) {
|
||||
if (buffer == begin)
|
||||
return ERRORS;
|
||||
if (*(buffer - 1) != '\n')
|
||||
if (loading == TRUE) /* Add '\n' to last line of file */
|
||||
if (*(buffer - 1) != '\n') {
|
||||
if (loading == TRUE) { /* Add '\n' to last line of file */
|
||||
*buffer++ = '\n';
|
||||
else {
|
||||
} else {
|
||||
*buffer = '\0';
|
||||
return NO_LINE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*buffer = '\0';
|
||||
|
|
Loading…
Reference in a new issue