getlines: Style fix

This commit is contained in:
sin 2015-02-11 00:27:30 +00:00
parent 66a5ea722d
commit 51680535ce
1 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ getlines(FILE *fp, struct linebuf *b)
memcpy(b->lines[b->nlines - 1], line, linelen);
}
free(line);
if (strchr(b->lines[b->nlines-1], '\n') == NULL) {
if (!strchr(b->lines[b->nlines - 1], '\n')) {
b->lines[b->nlines - 1] = erealloc(b->lines[b->nlines - 1], linelen + 1);
b->lines[b->nlines - 1][linelen - 1] = '\n';
b->lines[b->nlines - 1][linelen] = '\0';