diff options
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c index cfce7acdbd..b17a828795 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2065,10 +2065,9 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, enum object_type type, const char *path) { unsigned long size = st->st_size; - void *buf; + void *buf = NULL; int ret, re_allocated = 0; - buf = ""; if (size) buf = xmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); close(fd); |