From 2570b43e829ccfc0f199fe61aafc24b1bd3fc7b1 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Tue, 16 Sep 2003 05:25:43 +0000 Subject: Configuration option to define wether to follows GNU sed's behaviour or the posix standard. Put the cleanup code back the way it was. --- libbb/get_line_from_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libbb/get_line_from_file.c') diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index 3b6e1e778..9a831f184 100644 --- a/libbb/get_line_from_file.c +++ b/libbb/get_line_from_file.c @@ -40,7 +40,7 @@ static char *private_get_line_from_file(FILE *file, int c) while ((ch = getc(file)) != EOF) { /* grow the line buffer as necessary */ - if (idx > linebufsz-2) { + if (idx > linebufsz - 2) { linebuf = xrealloc(linebuf, linebufsz += GROWBY); } linebuf[idx++] = (char)ch; @@ -51,7 +51,6 @@ static char *private_get_line_from_file(FILE *file, int c) break; } } - if (linebuf) { if (ferror(file)) { free(linebuf); -- cgit v1.2.3