Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
pretty: use starts_with() to check for a prefix
[gitweb.git]
/
pretty.c
diff --git
a/pretty.c
b/pretty.c
index 31fc76b2fde8297298a7d9ffd38ea7f00eede2fa..af0f57ac831f7ed67883fc2d9125b72f1e90d7d7 100644
(file)
--- a/
pretty.c
+++ b/
pretty.c
@@
-586,7
+586,7
@@
static char *replace_encoding_header(char *buf, const char *encoding)
char *cp = buf;
/* guess if there is an encoding header before a \n\n */
- while (
strncmp(cp, "encoding ", strlen("encoding ")
)) {
+ while (
!starts_with(cp, "encoding "
)) {
cp = strchr(cp, '\n');
if (!cp || *++cp == '\n')
return buf;