From 134d046e74c415072ad5d5cce367359677368457 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 18 May 2022 00:35:36 +0200 Subject: [PATCH] Probe: build fix for FreeBSD --- src/probe.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/probe.c b/src/probe.c index 7ee484e..70b2f34 100644 --- a/src/probe.c +++ b/src/probe.c @@ -554,16 +554,11 @@ static int _volinfo_statfs_append(struct volinfo ** dev, struct statfs * buf, int nb); static int _volinfo_statfs(struct volinfo ** dev) { - int ret; struct statfs buf; - int cnt; - int cnt2; - if((cnt = statfs("/", &buf)) == -1) + if(statfs("/", &buf) != 0) return _probe_perror("statfs", -1); - if(_volinfo_statfs_append(dev, &buf[ret], 0) == 0) - return -1; - return ret; + return _volinfo_statfs_append(dev, &buf, 0); } static int _volinfo_statfs_append(struct volinfo ** dev, struct statfs * buf,