From owner-cvs-all Sun Feb 3 9:25:21 2002 Delivered-To: cvs-all@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 2BF7537B404; Sun, 3 Feb 2002 09:25:14 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g13HPCK22428; Sun, 3 Feb 2002 17:25:12 GMT (envelope-from mark@grondar.za) Received: from greenpeace.grondar.org (greenpeace [192.168.42.2]) by gratis.grondar.org (Postfix) with ESMTP id 380D575; Sun, 3 Feb 2002 17:24:59 +0000 (GMT) Received: from grondar.za (localhost [127.0.0.1]) by greenpeace.grondar.org (8.11.6/8.11.6) with ESMTP id g13HOwE61969; Sun, 3 Feb 2002 17:24:58 GMT (envelope-from mark@grondar.za) Message-Id: <200202031724.g13HOwE61969@greenpeace.grondar.org> To: Bruce Evans Cc: Mark Murray , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys socket.h types.h References: <20020204035957.Q20055-100000@gamplex.bde.org> In-Reply-To: <20020204035957.Q20055-100000@gamplex.bde.org> ; from Bruce Evans "Mon, 04 Feb 2002 04:12:48 +1100." Date: Sun, 03 Feb 2002 17:24:53 +0000 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Sun, 3 Feb 2002, Mark Murray wrote: > > > Ok, So what needs to be done? > > Back out the change to howmany(). The caller can always pass it types > with the same signedness (after promotion) or cast the value. This > is a bit like the caller having to do this for min(9undoc): > min(1U, -1) gives a very wrong value. min(1U, 1) gives the correct > value but may only escape being warned about because the args get > silently converted to u_int. So how does one write a (decent) macro to return a correct value for min(1u, -1)? howmany() is used so much in the kernel, and is defined in multiple places, so methinks it needs to be a function (inline?). It kicks out zillions of wanings when you try to lint it. M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message