From 0342e8db6e27ff1bfebbadc3167bff4a731c5103 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 28 Nov 2013 01:11:45 +0100 Subject: [PATCH] Additional fix for FreeBSD --- src/df.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/df.c b/src/df.c index 55460b8..27fb34b 100644 --- a/src/df.c +++ b/src/df.c @@ -88,7 +88,7 @@ static int _df_mtab(Prefs * prefs) return _df_error("getfsstat", 1); if((f = malloc(sizeof(*f) * i)) == NULL) return _df_error("malloc", 1); - if((cnt = getfsstat(f, sizeof(f), MNT_WAIT)) < 0) + if((cnt = getfsstat(f, sizeof(*f) * i, MNT_WAIT)) < 0) return _df_error("getfsstat", 1); for(i = 0; i < cnt; i++) /* XXX use the structure returned directly instead */