diff options
-rw-r--r-- | editors/patch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/patch.c b/editors/patch.c index 62477af16..507112377 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -25,7 +25,7 @@ static unsigned copy_lines(FILE *src_stream, FILE *dst_stream, unsigned lines_co | |||
25 | { | 25 | { |
26 | while (src_stream && lines_count) { | 26 | while (src_stream && lines_count) { |
27 | char *line; | 27 | char *line; |
28 | line = xmalloc_fgets(src_stream); | 28 | line = xmalloc_fgetline(src_stream); |
29 | if (line == NULL) { | 29 | if (line == NULL) { |
30 | break; | 30 | break; |
31 | } | 31 | } |
@@ -180,7 +180,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
180 | printf("patching file %s\n", new_filename); | 180 | printf("patching file %s\n", new_filename); |
181 | 181 | ||
182 | /* Handle all hunks for this file */ | 182 | /* Handle all hunks for this file */ |
183 | patch_line = xmalloc_fgets(patch_file); | 183 | patch_line = xmalloc_fgetline(patch_file); |
184 | while (patch_line) { | 184 | while (patch_line) { |
185 | unsigned count; | 185 | unsigned count; |
186 | unsigned src_beg_line; | 186 | unsigned src_beg_line; |
@@ -221,7 +221,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
221 | 221 | ||
222 | while (1) { | 222 | while (1) { |
223 | free(patch_line); | 223 | free(patch_line); |
224 | patch_line = xmalloc_fgets(patch_file); | 224 | patch_line = xmalloc_fgetline(patch_file); |
225 | if (patch_line == NULL) | 225 | if (patch_line == NULL) |
226 | break; /* EOF */ | 226 | break; /* EOF */ |
227 | if (!*patch_line) { | 227 | if (!*patch_line) { |
@@ -239,7 +239,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv) | |||
239 | if (src_cur_line == src_last_line) | 239 | if (src_cur_line == src_last_line) |
240 | break; | 240 | break; |
241 | if (src_stream) { | 241 | if (src_stream) { |
242 | src_line = xmalloc_fgets(src_stream); | 242 | src_line = xmalloc_fgetline(src_stream); |
243 | if (src_line) { | 243 | if (src_line) { |
244 | int diff = strcmp(src_line, patch_line + 1); | 244 | int diff = strcmp(src_line, patch_line + 1); |
245 | src_cur_line++; | 245 | src_cur_line++; |