From 3f811928dacc45988ff46befcc91baf5373bad31 Mon Sep 17 00:00:00 2001 From: riz Date: Mon, 3 Dec 2007 18:49:24 +0000 Subject: [PATCH] Cast sf->f_bsize to int to force signed division. Fixes this test on amd64, and probably other 64-bit platforms. --- tests/util/df/getmntinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/util/df/getmntinfo.c b/tests/util/df/getmntinfo.c index c6fce6caacb5..db62faac3a7e 100644 --- a/tests/util/df/getmntinfo.c +++ b/tests/util/df/getmntinfo.c @@ -1,4 +1,4 @@ -/* $NetBSD: getmntinfo.c,v 1.1 2007/11/12 15:14:01 jmmv Exp $ */ +/* $NetBSD: getmntinfo.c,v 1.2 2007/12/03 18:49:24 riz Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. @@ -85,7 +85,7 @@ other_variants(const struct statvfs *tmpl, const int *minfree, int minfreecnt, used = total * consumed[j] / 100; sf->f_bfree = (total - used) / sf->f_bsize; sf->f_bavail = (total * (100 - minfree[i]) / 100 - - used) / sf->f_bsize; + used) / (int)sf->f_bsize; sf->f_bresvd = sf->f_bfree - sf->f_bavail; } }