aboutsummaryrefslogtreecommitdiff
path: root/editors/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/patch.c')
-rw-r--r--editors/patch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/patch.c b/editors/patch.c
index f86067544..cb25e4140 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -414,7 +414,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
414 } 414 }
415 415
416 // Open a new file? 416 // Open a new file?
417 if (!strncmp("--- ", patchline, 4) || !strncmp("+++ ", patchline, 4)) { 417 if (is_prefixed_with(patchline, "--- ") || is_prefixed_with(patchline, "+++ ")) {
418 char *s, **name = reverse ? &newname : &oldname; 418 char *s, **name = reverse ? &newname : &oldname;
419 int i; 419 int i;
420 420
@@ -446,7 +446,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
446 446
447 // Start a new hunk? Usually @@ -oldline,oldlen +newline,newlen @@ 447 // Start a new hunk? Usually @@ -oldline,oldlen +newline,newlen @@
448 // but a missing ,value means the value is 1. 448 // but a missing ,value means the value is 1.
449 } else if (state == 1 && !strncmp("@@ -", patchline, 4)) { 449 } else if (state == 1 && is_prefixed_with(patchline, "@@ -")) {
450 int i; 450 int i;
451 char *s = patchline+4; 451 char *s = patchline+4;
452 452