diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-06 14:57:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-06 14:57:57 -0800 |
commit | f56a5f4fed296647ae8978645f9c627410717398 (patch) | |
tree | 693afac09ae1fd40b7ab39ae8b8122cde6050b7f /pretty.c | |
parent | Merge branch 'mm/am-c-doc' into maint (diff) | |
parent | sha1_name: use strlcpy() to copy strings (diff) | |
download | tgif-f56a5f4fed296647ae8978645f9c627410717398.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |