[PATCH] Docs for git-show-rev-cache.
[git.git] / sha1_file.c
index 7766977..64eac59 100644 (file)
@@ -283,7 +283,10 @@ void prepare_alt_odb(void)
        char *map;
        int fd;
        struct stat st;
-       char *alt = gitenv(ALTERNATE_DB_ENVIRONMENT) ? : "";
+       char *alt;
+
+       alt = gitenv(ALTERNATE_DB_ENVIRONMENT);
+       if (!alt) alt = "";
 
        sprintf(path, "%s/info/alternates", get_object_directory());
        if (alt_odb_tail)
@@ -484,7 +487,7 @@ struct packed_git *parse_pack_index(unsigned char *sha1)
        return parse_pack_index_file(sha1, path);
 }
 
-struct packed_git *parse_pack_index_file(unsigned char *sha1, char *idx_path)
+struct packed_git *parse_pack_index_file(const unsigned char *sha1, char *idx_path)
 {
        struct packed_git *p;
        unsigned long idx_size;