summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-07 13:23:03 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-07 13:23:03 -0400
commitcf032e8775a70729c397d731a5e2e1ecb58f4877 (patch)
tree10850dfeba9fb2e0424667e0da797ab8f0fbf91c /src
parent39b51c6d6e947778bf2b63fc9586a3236665881e (diff)
downloadbfs-cf032e8775a70729c397d731a5e2e1ecb58f4877.tar.xz
mtab: Fix getmntinfo() error check
The man pages all say "if an error occurs, zero is returned"
Diffstat (limited to 'src')
-rw-r--r--src/mtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mtab.c b/src/mtab.c
index 7905d14..9ea8d4a 100644
--- a/src/mtab.c
+++ b/src/mtab.c
@@ -148,7 +148,7 @@ struct bfs_mtab *bfs_mtab_parse(void) {
bfs_statfs *mntbuf;
int size = getmntinfo(&mntbuf, MNT_WAIT);
- if (size < 0) {
+ if (size <= 0) {
error = errno;
goto fail;
}