svn commit: trunk/busybox/editors

vda at busybox.net vda at busybox.net
Wed Aug 1 23:30:55 UTC 2007


Author: vda
Date: 2007-08-01 16:30:54 -0700 (Wed, 01 Aug 2007)
New Revision: 19395

Log:
patch: fix bad line ending handling ("Nguyen Thai Ngoc Duy" <pclouds at gmail.com>)



Modified:
   trunk/busybox/editors/patch.c


Changeset:
Modified: trunk/busybox/editors/patch.c
===================================================================
--- trunk/busybox/editors/patch.c	2007-08-01 22:34:50 UTC (rev 19394)
+++ trunk/busybox/editors/patch.c	2007-08-01 23:30:54 UTC (rev 19395)
@@ -96,7 +96,7 @@
 		ret = 0;
 	}
 
-	patch_line = xmalloc_fgets(patch_file);
+	patch_line = xmalloc_getline(patch_file);
 	while (patch_line) {
 		FILE *src_stream;
 		FILE *dst_stream;
@@ -115,7 +115,7 @@
 		 */
 		while (patch_line && strncmp(patch_line, "--- ", 4) != 0) {
 			free(patch_line);
-			patch_line = xmalloc_fgets(patch_file);
+			patch_line = xmalloc_getline(patch_file);
 		}
 		/* FIXME: patch_line NULL check?? */
 
@@ -123,7 +123,7 @@
 		original_filename = extract_filename(patch_line, patch_level);
 		free(patch_line);
 
-		patch_line = xmalloc_fgets(patch_file);
+		patch_line = xmalloc_getline(patch_file);
 		/* FIXME: NULL check?? */
 		if (strncmp(patch_line, "+++ ", 4) != 0) {
 			ret = 2;




More information about the busybox-cvs mailing list