Skip to content

Commit d7f8a37

Browse files
committed
Merge branch 'jk/loose-object-fsck'
Code cleanup. * jk/loose-object-fsck: sha1_file: remove an used fd variable
2 parents 5bceab4 + 0747fb4 commit d7f8a37

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sha1_file.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3972,7 +3972,6 @@ int read_loose_object(const char *path,
39723972
void **contents)
39733973
{
39743974
int ret = -1;
3975-
int fd = -1;
39763975
void *map = NULL;
39773976
unsigned long mapsize;
39783977
git_zstream stream;
@@ -4022,7 +4021,5 @@ int read_loose_object(const char *path,
40224021
out:
40234022
if (map)
40244023
munmap(map, mapsize);
4025-
if (fd >= 0)
4026-
close(fd);
40274024
return ret;
40284025
}

0 commit comments

Comments
 (0)