summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-01-18 11:27:54 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-01-18 12:27:29 -0500
commit03563b1407e436b2863509ebf09d412e79cbd1dd (patch)
treed2e5b735c8be3078b7b76c31c9168330a7f2557b /bftw.c
parentabbb00766a8d10f63bbafb60bb13eb4672d7f44a (diff)
downloadbfs-03563b1407e436b2863509ebf09d412e79cbd1dd.tar.xz
util: New close() wrappers to check for EBADF and preserve errno
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bftw.c b/bftw.c
index 64b1120..5f5afff 100644
--- a/bftw.c
+++ b/bftw.c
@@ -1,6 +1,6 @@
/****************************************************************************
* bfs *
- * Copyright (C) 2015-2021 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2015-2022 Tavian Barnes <tavianator@tavianator.com> *
* *
* Permission to use, copy, modify, and/or distribute this software for any *
* purpose with or without fee is hereby granted. *
@@ -244,7 +244,7 @@ static void bftw_file_close(struct bftw_cache *cache, struct bftw_file *file) {
bftw_cache_remove(cache, file);
- close(file->fd);
+ xclose(file->fd);
file->fd = -1;
}