summaryrefslogtreecommitdiff
path: root/tree-walk.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-06-22 23:19:43 -0700
committerJunio C Hamano <gitster@pobox.com>2007-06-22 23:19:43 -0700
commit63daae47e59b72ebec3595ca3e9917e6c595c814 (patch)
tree9db85db2ee8e1ec15477df20814adf07be5d4af2 /tree-walk.h
parent0ce396431ee710aa406f7e41ad9578dcac54085f (diff)
downloadgit-63daae47e59b72ebec3595ca3e9917e6c595c814.tar.gz
Two trivial -Wcast-qual fixes
Luiz Fernando N. Capitulino noticed the one in tree-walk.h where we cast away constness while computing the legnth of a tree entry. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.h')
-rw-r--r--tree-walk.h2
1 files changed, 1 insertions, 1 deletions
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 *);