From: Linus Torvalds Date: Thu, 21 Apr 2005 01:49:41 +0000 (-0700) Subject: Fix up some problems from the commit->tree helper patch X-Git-Tag: v0.99~787 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=860edf7a710245ac748ada2ae3c0581a79f51f55;p=git.git Fix up some problems from the commit->tree helper patch --- diff --git a/sha1_file.c b/sha1_file.c index 7b7b65d2e..6f7228e10 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -174,7 +174,7 @@ void *read_tree_with_tree_or_commit_sha1(const unsigned char *sha1, void *buffer; unsigned long isize; int was_commit = 0; - char tree_sha1[20]; + unsigned char tree_sha1[20]; buffer = read_sha1_file(sha1, type, &isize); @@ -197,7 +197,7 @@ void *read_tree_with_tree_or_commit_sha1(const unsigned char *sha1, */ if (!buffer || strcmp(type, "tree")) { free(buffer); - return; + return NULL; } *size = isize;