From owner-cvs-all@FreeBSD.ORG Sun Nov 20 09:50:44 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3443516A41F; Sun, 20 Nov 2005 09:50:44 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd4mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC83E43D45; Sun, 20 Nov 2005 09:50:43 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd2mr6so.prod.shaw.ca (pd2mr6so-qfe3.prod.shaw.ca [10.0.141.9]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IQ800LD5ZCJOXF0@l-daemon>; Sun, 20 Nov 2005 02:50:43 -0700 (MST) Received: from pn2ml4so.prod.shaw.ca ([10.0.121.148]) by pd2mr6so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IQ800G70ZCJ8S60@pd2mr6so.prod.shaw.ca>; Sun, 20 Nov 2005 02:50:43 -0700 (MST) Received: from [192.168.0.60] (S0106006067227a4a.vc.shawcable.net [24.87.209.6]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0IQ800JJCZCI7K@l-daemon>; Sun, 20 Nov 2005 02:50:42 -0700 (MST) Date: Sun, 20 Nov 2005 01:50:42 -0800 From: Colin Percival In-reply-to: <20051120080850.GD856@eucla.lemis.com> To: Greg 'groggy' Lehey Message-id: <438046F2.60003@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en X-Enigmail-Version: 0.93.0.0 References: <200511200050.jAK0oUbB059874@repoman.freebsd.org> <20051120080850.GD856@eucla.lemis.com> User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051001) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/portsnap/make_index make_index.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2005 09:50:44 -0000 Greg 'groggy' Lehey wrote: > On Sunday, 20 November 2005 at 0:50:30 +0000, Colin Percival wrote: >> Log: >> An empty file does not have a positive number of lines. > > Yes it does. It's 0, not -0. As a mathematician, I must insist that 0 = -0 and is neither positive nor negative. :-) >> Make sure that the number of lines read is non-zero before in >> order to avoid dumping core. > > This is a different (and presumably correct) test. The correct test is actually to verify that the number of lines is positive, but while we cannot assume this (as I originally did), we can assume that the number of lines is non-negative (and all non-negative non-zero values are positive). Colin Percival