From owner-cvs-all Sun Feb 3 5: 4:41 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id E820937B419; Sun, 3 Feb 2002 05:04:34 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id AAA21201; Mon, 4 Feb 2002 00:04:31 +1100 Date: Mon, 4 Feb 2002 00:06:49 +1100 (EST) From: Bruce Evans X-X-Sender: To: Mark Murray Cc: , Subject: Re: cvs commit: src/sys/sys socket.h types.h In-Reply-To: <200202031136.g13Bax289770@freefall.freebsd.org> Message-ID: <20020203230517.L19026-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: > markm 2002/02/03 03:36:59 PST > > Modified files: > sys/sys socket.h types.h > Log: > Zero functional difference; make some integer constants unsigned, as > they are used in unsigned context. This shuts lint(1) up in a few > significant ways with "signed/unsigned" arithmetic warnings. > > Revision Changes Path > 1.58 +2 -2 src/sys/sys/socket.h > 1.50 +3 -3 src/sys/sys/types.h The change to howmany() is not good. It changes the functionality of howmany() on negative values. howmany() never worked right on negative values, so this is not very important. More importantly, the change causes sign mismatches and brokenness where there was none before, e.g., for const int x = 0; assert(howmany(x, 1) - 1 < 0); Also, the change usually doesn't fix the warning for const long long x = 0; const unsigned long long y = 0; assert(howmany(x, 1) == y); since 1U is usually promoted to 1LL in the changed howmany(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message