diff options
author | Denis Vlasenko | 2007-08-01 23:30:54 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-08-01 23:30:54 +0000 |
commit | fc77eb54e791c7d636c20993ec81396052af84f0 (patch) | |
tree | 6525bd68fcdce16266dec77a8628619cf4eadbb5 /editors/patch.c | |
parent | a1b16f4d5c0dd119f85f13c8cb1399a701a3e815 (diff) | |
download | busybox-fc77eb54e791c7d636c20993ec81396052af84f0.zip busybox-fc77eb54e791c7d636c20993ec81396052af84f0.tar.gz |
patch: fix bad line ending handling ("Nguyen Thai Ngoc Duy" <pclouds@gmail.com>)
Diffstat (limited to 'editors/patch.c')
-rw-r--r-- | editors/patch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/patch.c b/editors/patch.c index f65bbf4..5f7f7d0 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -96,7 +96,7 @@ int patch_main(int argc, char **argv) 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 @@ int patch_main(int argc, char **argv) */ 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 @@ int patch_main(int argc, char **argv) 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; |