diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-07 13:23:03 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-07 13:23:03 -0400 |
commit | cf032e8775a70729c397d731a5e2e1ecb58f4877 (patch) | |
tree | 10850dfeba9fb2e0424667e0da797ab8f0fbf91c /src/mtab.c | |
parent | 39b51c6d6e947778bf2b63fc9586a3236665881e (diff) | |
download | bfs-cf032e8775a70729c397d731a5e2e1ecb58f4877.tar.xz |
mtab: Fix getmntinfo() error check
The man pages all say "if an error occurs, zero is returned"
Diffstat (limited to 'src/mtab.c')
-rw-r--r-- | src/mtab.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |