Skip to content

Commit 0747fb4

Browse files
sschuberthgitster
authored andcommitted
sha1_file: remove an used fd variable
Signed-off-by: Sebastian Schuberth <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cce044d commit 0747fb4

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
@@ -3870,7 +3870,6 @@ int read_loose_object(const char *path,
38703870
void **contents)
38713871
{
38723872
int ret = -1;
3873-
int fd = -1;
38743873
void *map = NULL;
38753874
unsigned long mapsize;
38763875
git_zstream stream;
@@ -3920,7 +3919,5 @@ int read_loose_object(const char *path,
39203919
out:
39213920
if (map)
39223921
munmap(map, mapsize);
3923-
if (fd >= 0)
3924-
close(fd);
39253922
return ret;
39263923
}

0 commit comments

Comments
 (0)