From owner-cvs-src@FreeBSD.ORG Tue Jan 3 11:22:17 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2095316A41F; Tue, 3 Jan 2006 11:22:17 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD9EC43D4C; Tue, 3 Jan 2006 11:22:15 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 95C4C52CC3; Tue, 3 Jan 2006 12:22:12 +0100 (CET) Received: from localhost (dkd58.neoplus.adsl.tpnet.pl [83.24.7.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C4C4452C88; Tue, 3 Jan 2006 12:22:03 +0100 (CET) Date: Tue, 3 Jan 2006 12:21:56 +0100 From: Pawel Jakub Dawidek To: Andrew Thompson Message-ID: <20060103112156.GB8302@garage.freebsd.pl> References: <200601022302.k02N2hBV014825@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Content-Disposition: inline In-Reply-To: <200601022302.k02N2hBV014825@repoman.freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL,RCVD_IN_XBL autolearn=no version=3.0.4 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_bridge.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 11:22:17 -0000 --8GpibOaaTibBMecb Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 02, 2006 at 11:02:43PM +0000, Andrew Thompson wrote: +> thompsa 2006-01-02 23:02:43 UTC +>=20 +> FreeBSD src repository +>=20 +> Modified files: +> sys/net if_bridge.c=20 +> Log: +> Fix a brain-o in the last commit, the conditional was always false. [...] +> - if (flags & IFBAF_DYNAMIC) +> + if ((flags & IFBAF_TYPEMASK) =3D=3D IFBAF_DYNAMIC) On first look, I thought it does exactly the same thing, but I checked the code and now I know it doesn't - IFBAF_DYNAMIC is 0x00. Another example that giving 0 for a define which should represent a flag is a bad idea. The same problem we had in the past with M_NOWAIT. You should consider changing it to some real value to avoid mistakes like this in the future or removing IFBAF_DYNAMIC entirely and changing such condition to 'if (!(flags & IFBAF_STATIC))'. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --8GpibOaaTibBMecb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDul5UForvXbEpPzQRAkJ2AJ9xak+x91DOBma4Hewi5Z2db1kqQgCfXfY4 2k7AdYRFxrOTWm8gvTkXLuY= =BPPP -----END PGP SIGNATURE----- --8GpibOaaTibBMecb--