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:
Thomas Cort 2014-02-16 20:08:20 +00:00
parent 38bb8cec91
commit 7ebdb97a28

View file

@ -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';