diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-23 13:35:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-23 13:35:22 -0700 |
commit | b83cfa5949081c32a13b84e8aeea7d2cb7a96331 (patch) | |
tree | ab7d7cc080ea030b18f9110013f140cb3a656b14 /archive-tar.c | |
parent | 8d19426f985afdf4cc34f88198226964566dcdc1 (diff) | |
parent | bf38245be8f481ac1c08a98951b7fd00bbfc15ea (diff) | |
download | git-b83cfa5949081c32a13b84e8aeea7d2cb7a96331.tar.gz |
Merge branch 'rs/archive-tree-in-tip-simplify'
By René Scharfe
* rs/archive-tree-in-tip-simplify:
archive-tar: keep const in checksum calculation
archive: simplify refname handling
Diffstat (limited to 'archive-tar.c')
-rw-r--r-- | archive-tar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archive-tar.c b/archive-tar.c index 93387ea336..dc91c6b50d 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -139,13 +139,13 @@ static void strbuf_append_ext_header(struct strbuf *sb, const char *keyword, static unsigned int ustar_header_chksum(const struct ustar_header *header) { - char *p = (char *)header; + const char *p = (const char *)header; unsigned int chksum = 0; while (p < header->chksum) chksum += *p++; chksum += sizeof(header->chksum) * ' '; p += sizeof(header->chksum); - while (p < (char *)header + sizeof(struct ustar_header)) + while (p < (const char *)header + sizeof(struct ustar_header)) chksum += *p++; return chksum; } |