[BusyBox-cvs] busybox/libbb get_line_from_file.c,1.5,1.6

Glenn McGrath bug1 at busybox.net
Tue Sep 16 05:25:45 UTC 2003


Update of /var/cvs/busybox/libbb
In directory winder:/tmp/cvs-serv1286/libbb

Modified Files:
	get_line_from_file.c 
Log Message:
Configuration option to define wether to follows GNU sed's behaviour
or the posix standard.
Put the cleanup code back the way it was.


Index: get_line_from_file.c
===================================================================
RCS file: /var/cvs/busybox/libbb/get_line_from_file.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- get_line_from_file.c	14 Jul 2003 21:20:55 -0000	1.5
+++ get_line_from_file.c	16 Sep 2003 05:25:41 -0000	1.6
@@ -40,7 +40,7 @@
 
 	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 @@
 			break;
 		}
 	}
-
 	if (linebuf) {
 		if (ferror(file)) {
 			free(linebuf);




More information about the busybox-cvs mailing list