diff options
-rw-r--r-- | cache-tree.c | 2 | ||||
-rw-r--r-- | tree-walk.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c index 350a79b768..077f034369 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -478,7 +478,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p) if (0 <= it->entry_count) { if (size < 20) goto free_return; - hashcpy(it->sha1, (unsigned char*)buf); + hashcpy(it->sha1, (const unsigned char*)buf); buf += 20; size -= 20; } diff --git a/tree-walk.h b/tree-walk.h index ee747aba0b..db0fbdc701 100644 --- a/tree-walk.h +++ b/tree-walk.h @@ -22,7 +22,7 @@ static inline const unsigned char *tree_entry_extract(struct tree_desc *desc, co static inline int tree_entry_len(const char *name, const unsigned char *sha1) { - return (char *)sha1 - (char *)name - 1; + return (const char *)sha1 - name - 1; } void update_tree_entry(struct tree_desc *); |