aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/patch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/patch.c b/editors/patch.c
index f65bbf4f9..5f7f7d028 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -96,7 +96,7 @@ int patch_main(int argc, char **argv)
96 ret = 0; 96 ret = 0;
97 } 97 }
98 98
99 patch_line = xmalloc_fgets(patch_file); 99 patch_line = xmalloc_getline(patch_file);
100 while (patch_line) { 100 while (patch_line) {
101 FILE *src_stream; 101 FILE *src_stream;
102 FILE *dst_stream; 102 FILE *dst_stream;
@@ -115,7 +115,7 @@ int patch_main(int argc, char **argv)
115 */ 115 */
116 while (patch_line && strncmp(patch_line, "--- ", 4) != 0) { 116 while (patch_line && strncmp(patch_line, "--- ", 4) != 0) {
117 free(patch_line); 117 free(patch_line);
118 patch_line = xmalloc_fgets(patch_file); 118 patch_line = xmalloc_getline(patch_file);
119 } 119 }
120 /* FIXME: patch_line NULL check?? */ 120 /* FIXME: patch_line NULL check?? */
121 121
@@ -123,7 +123,7 @@ int patch_main(int argc, char **argv)
123 original_filename = extract_filename(patch_line, patch_level); 123 original_filename = extract_filename(patch_line, patch_level);
124 free(patch_line); 124 free(patch_line);
125 125
126 patch_line = xmalloc_fgets(patch_file); 126 patch_line = xmalloc_getline(patch_file);
127 /* FIXME: NULL check?? */ 127 /* FIXME: NULL check?? */
128 if (strncmp(patch_line, "+++ ", 4) != 0) { 128 if (strncmp(patch_line, "+++ ", 4) != 0) {
129 ret = 2; 129 ret = 2;