test-parse-options: update to handle negative ints
[gitweb.git] / read-cache.c
index 723d48dddfe58f50b30105689dfeb9bcb388c8f2..5dee4e2b7f20b5b2ddece63c753af4011a0a71e5 100644 (file)
@@ -1562,7 +1562,7 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
        if (mmap_size < sizeof(struct cache_header) + 20)
                die("index file smaller than expected");
 
-       mmap = xmmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+       mmap = xmmap(NULL, mmap_size, PROT_READ, MAP_PRIVATE, fd, 0);
        if (mmap == MAP_FAILED)
                die_errno("unable to map index file");
        close(fd);