From owner-svn-src-head@FreeBSD.ORG Sun Aug 15 20:16:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E34106566B; Sun, 15 Aug 2010 20:16:59 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [204.109.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id 24F648FC1A; Sun, 15 Aug 2010 20:16:58 +0000 (UTC) Received: from unknown (client-86-31-88-103.midd.adsl.virginmedia.com [86.31.88.103]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id E01E35C25; Sun, 15 Aug 2010 19:57:22 +0000 (UTC) Date: Sun, 15 Aug 2010 20:57:24 +0100 From: Bruce Cran To: Dag-Erling Smorgrav Message-ID: <20100815205724.00007e0f@unknown> In-Reply-To: <201008141434.o7EEYaSA030301@svn.freebsd.org> References: <201008141434.o7EEYaSA030301@svn.freebsd.org> X-Mailer: Claws Mail 3.7.4cvs1 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211304 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 20:16:59 -0000 On Sat, 14 Aug 2010 14:34:36 +0000 (UTC) Dag-Erling Smorgrav wrote: > Author: des > Date: Sat Aug 14 14:34:36 2010 > New Revision: 211304 > URL: http://svn.freebsd.org/changeset/base/211304 > > Log: > Simplify expand_number() by combining the (unrolled) loop with the > switch. Since expand_number() does not accept negative numbers, > switch from int64_t to uint64_t; this makes it easier to check for > overflow. > MFC after: 3 weeks Somewhat related, there are overflow bugs in humanize_number - for example df(1) fails to display space from a 100PB filesystem correctly. -- Bruce Cran