sha1_file: remove an used fd variable

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Sebastian Schuberth 2017-04-16 19:04:01 +00:00 committed by Junio C Hamano
parent cce044df7f
commit 0747fb49fd

View File

@ -3870,7 +3870,6 @@ int read_loose_object(const char *path,
void **contents) void **contents)
{ {
int ret = -1; int ret = -1;
int fd = -1;
void *map = NULL; void *map = NULL;
unsigned long mapsize; unsigned long mapsize;
git_zstream stream; git_zstream stream;
@ -3920,7 +3919,5 @@ int read_loose_object(const char *path,
out: out:
if (map) if (map)
munmap(map, mapsize); munmap(map, mapsize);
if (fd >= 0)
close(fd);
return ret; return ret;
} }