← Commit list

fc77eb54e

Denis Vlasenko
Denis Vlasenko
2007-08-01
FAILED Duration: 19s

Subject

patch: fix bad line ending handling ("Nguyen Thai Ngoc Duy" )

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/patch.c+3 -3
@@ -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;