From owner-freebsd-current Tue Nov 12 16: 0: 8 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B82A537B406; Tue, 12 Nov 2002 16:00:06 -0800 (PST) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 229EF43E3B; Tue, 12 Nov 2002 16:00:06 -0800 (PST) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id PAA11857; Tue, 12 Nov 2002 15:49:06 -0800 (PST) Received: from arch20m.dellroad.org (localhost [127.0.0.1]) by arch20m.dellroad.org (8.12.6/8.12.6) with ESMTP id gACNn5OS017669; Tue, 12 Nov 2002 15:49:05 -0800 (PST) (envelope-from archie@arch20m.dellroad.org) Received: (from archie@localhost) by arch20m.dellroad.org (8.12.6/8.12.6/Submit) id gACNn5cX017668; Tue, 12 Nov 2002 15:49:05 -0800 (PST) From: Archie Cobbs Message-Id: <200211122349.gACNn5cX017668@arch20m.dellroad.org> Subject: Re: addition to cdefs In-Reply-To: <20021111112128.G52940@espresso.q9media.com> To: Mike Barcroft Date: Tue, 12 Nov 2002 15:49:05 -0800 (PST) Cc: Marc Recht , Garrett Wollman , current@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Marc Recht writes: > I've had the attached patch in my tree for a while. I'll try and get > it and the patch committed today. static __inline void __fd_zero(fd_set *p, __size_t n) { n = _howmany(n, _NFDBITS); while (n > 0) p->fds_bits[n--] = 0; } That looks broken. Maybe you meant this: static __inline void __fd_zero(fd_set *p, __size_t n) { n = _howmany(n, _NFDBITS); while (n > 0) p->fds_bits[--n] = 0; } But why not just this? static __inline void __fd_zero(fd_set *p, __size_t n) { memset(p->fds_bits, 0, _howmany(n, _NFDBITS)); } -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message