Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-07 01:57:57 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-07 01:57:57 +0300
commitf56a5f4fed296647ae8978645f9c627410717398 (patch)
tree693afac09ae1fd40b7ab39ae8b8122cde6050b7f /pretty.c
parentd86679fa061e22e33596814630513b6a7b4d4767 (diff)
parent2ce63e9fac242a70cd6d9e1325063bbb2e5091f8 (diff)
Merge branch 'rs/simple-cleanups' into maint
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 9d34d02db1..7b49304181 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;