diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-08 13:15:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-08 13:15:03 -0700 |
commit | c08e112b437b3112a05d1245cbb723d910ff8455 (patch) | |
tree | 62f47cf6c517f9677bf1fe17f686a05098fd2d07 /mailinfo.c | |
parent | 18b49be4927bb327449624c37eebd13a5b9c1582 (diff) | |
parent | 4184cbd635140e83c5f0d57c377eec93a9b6eedf (diff) | |
download | git-c08e112b437b3112a05d1245cbb723d910ff8455.tar.gz |
Merge branch 'ar/mailinfo-memcmp-to-skip-prefix'
Code clean-up.
* ar/mailinfo-memcmp-to-skip-prefix:
mailinfo: use starts_with() when checking scissors
Diffstat (limited to 'mailinfo.c')
-rw-r--r-- | mailinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mailinfo.c b/mailinfo.c index 184ed8d581..02f6f95357 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -705,8 +705,8 @@ static int is_scissors_line(const char *line) perforation++; continue; } - if ((!memcmp(c, ">8", 2) || !memcmp(c, "8<", 2) || - !memcmp(c, ">%", 2) || !memcmp(c, "%<", 2))) { + if (starts_with(c, ">8") || starts_with(c, "8<") || + starts_with(c, ">%") || starts_with(c, "%<")) { in_perforation = 1; perforation += 2; scissors += 2; |