svn commit: r244134 - head/bin/df

Greg Lehey grog at FreeBSD.org
Wed Dec 12 04:18:26 UTC 2012


Author: grog
Date: Wed Dec 12 04:18:25 2012
New Revision: 244134
URL: http://svnweb.freebsd.org/changeset/base/244134

Log:
  Handle large negative block counts correctly.
  
  MFC after:	 2 weeks

Modified:
  head/bin/df/df.c

Modified: head/bin/df/df.c
==============================================================================
--- head/bin/df/df.c	Wed Dec 12 02:55:40 2012	(r244133)
+++ head/bin/df/df.c	Wed Dec 12 04:18:25 2012	(r244134)
@@ -397,7 +397,7 @@ prthumanvalinode(int64_t bytes)
 static intmax_t
 fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
 {
-	return (num * (intmax_t) fsbs / bs);
+	return (num * (intmax_t) fsbs / (int64_t) bs);
 }
 
 /*


More information about the svn-src-head mailing list