aboutsummaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-05 12:45:42 -0800
committerJunio C Hamano <gitster@pobox.com>2015-03-05 12:45:42 -0800
commit8a6444d50ea73350ae7e6083ecc63393749e5bb0 (patch)
tree949f413a7105dc06326fc3fc5108ebff92397f57 /pretty.c
parentca704731b1fdf77b8f6d296bcde206c67ed9d73a (diff)
parent2ce63e9fac242a70cd6d9e1325063bbb2e5091f8 (diff)
downloadgit-8a6444d50ea73350ae7e6083ecc63393749e5bb0.tar.gz
git-8a6444d50ea73350ae7e6083ecc63393749e5bb0.tar.xz
Merge branch 'rs/simple-cleanups'
Code cleanups. * rs/simple-cleanups: sha1_name: use strlcpy() to copy strings pretty: use starts_with() to check for a prefix for-each-ref: use skip_prefix() to avoid duplicate string comparison connect: use strcmp() for string comparison
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index 9d34d02db..7b4930418 100644
--- a/pretty.c
+++ b/pretty.c
@@ -567,7 +567,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;