summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2017-04-16 19:04:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-17 04:29:18 (GMT)
commit0747fb49fd23945843e8824cb56c4463b10a34e0 (patch)
treed1477f8911d1396aa5180631cdbe20a101a7abc8
parentcce044df7f2392d0c6cb21d6dca94f01ff838727 (diff)
downloadgit-0747fb49fd23945843e8824cb56c4463b10a34e0.zip
git-0747fb49fd23945843e8824cb56c4463b10a34e0.tar.gz
git-0747fb49fd23945843e8824cb56c4463b10a34e0.tar.bz2
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>
-rw-r--r--sha1_file.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c
index b2c6648..1356ecb 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -3870,7 +3870,6 @@ int read_loose_object(const char *path,
void **contents)
{
int ret = -1;
- int fd = -1;
void *map = NULL;
unsigned long mapsize;
git_zstream stream;
@@ -3920,7 +3919,5 @@ int read_loose_object(const char *path,
out:
if (map)
munmap(map, mapsize);
- if (fd >= 0)
- close(fd);
return ret;
}