Update the documentation for git-merge-base
[git.git] / pack-objects.c
index f7d6217..614e87b 100644 (file)
@@ -156,7 +156,7 @@ static void prepare_pack_revindex(struct pack_revindex *rix)
 
        rix->revindex = xmalloc(sizeof(unsigned long) * (num_ent + 1));
        for (i = 0; i < num_ent; i++) {
-               long hl = *((long *)(index + 24 * i));
+               unsigned int hl = *((unsigned int *)(index + 24 * i));
                rix->revindex[i] = ntohl(hl);
        }
        /* This knows the pack format -- the 20-byte trailer
@@ -1231,7 +1231,7 @@ static void setup_progress_signal(void)
 int main(int argc, char **argv)
 {
        SHA_CTX ctx;
-       char line[PATH_MAX + 20];
+       char line[40 + 1 + PATH_MAX + 2];
        int window = 10, depth = 10, pack_to_stdout = 0;
        struct object_entry **list;
        int num_preferred_base = 0;