diff options
author | Glenn L McGrath | 2003-09-16 05:25:43 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-09-16 05:25:43 +0000 |
commit | 2570b43e829ccfc0f199fe61aafc24b1bd3fc7b1 (patch) | |
tree | de00e748021d3078ea21bb90017ded81129cb4bd /libbb | |
parent | 204ff1cea49c958846cd49175fa9318b81b5756f (diff) | |
download | busybox-2570b43e829ccfc0f199fe61aafc24b1bd3fc7b1.zip busybox-2570b43e829ccfc0f199fe61aafc24b1bd3fc7b1.tar.gz |
Configuration option to define wether to follows GNU sed's behaviour
or the posix standard.
Put the cleanup code back the way it was.
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/get_line_from_file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index 3b6e1e7..9a831f1 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); |