summaryrefslogtreecommitdiff
path: root/builtin/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-03-22 18:53:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-23 20:52:05 (GMT)
commitcba595bd21fd0731e37898dbd6c5b55f65fd8aea (patch)
tree2bd67efd15c4aab92cd7abde661c500a663edeef /builtin/diff.c
parent498a04af143f55a7bbbba484d48a7f123d43be04 (diff)
downloadgit-cba595bd21fd0731e37898dbd6c5b55f65fd8aea.zip
git-cba595bd21fd0731e37898dbd6c5b55f65fd8aea.tar.gz
git-cba595bd21fd0731e37898dbd6c5b55f65fd8aea.tar.bz2
drop casts from users EMPTY_TREE_SHA1_BIN
This macro already evaluates to the correct type, as it casts the string literal to "unsigned char *" itself (and callers who want the literal can use the _LITERAL form). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/diff.c')
-rw-r--r--builtin/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index 424c815..9069dc4 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -327,7 +327,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
add_head_to_pending(&rev);
if (!rev.pending.nr) {
struct tree *tree;
- tree = lookup_tree((const unsigned char*)EMPTY_TREE_SHA1_BIN);
+ tree = lookup_tree(EMPTY_TREE_SHA1_BIN);
add_pending_object(&rev, &tree->object, "HEAD");
}
break;