]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Fix up some problems from the commit->tree helper patch
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 21 Apr 2005 01:49:41 +0000 (18:49 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 21 Apr 2005 01:49:41 +0000 (18:49 -0700)
sha1_file.c

index 7b7b65d2eb3757ceb83f35a60be07e8d705dc0fb..6f7228e106d4e24b18f8416cc6adc2a6fd303eb7 100644 (file)
@@ -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;