aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vis.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index 39c5c94..2cfc40a 100644
--- a/vis.c
+++ b/vis.c
@@ -1567,8 +1567,7 @@ static bool cmd_read(Filerange *range, const char *argv[]) {
text_insert(vis->win->text, pos, data, info.st_size);
pos += info.st_size;
err:
- if (fd > 2)
- close(fd);
+ close(fd);
if (data && data != MAP_FAILED)
munmap(data, info.st_size);
}