cvs commit: src/sys/net if_bridge.c
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Jan 3 03:22:17 PST 2006
On Mon, Jan 02, 2006 at 11:02:43PM +0000, Andrew Thompson wrote:
+> thompsa 2006-01-02 23:02:43 UTC
+>
+> FreeBSD src repository
+>
+> Modified files:
+> sys/net if_bridge.c
+> Log:
+> Fix a brain-o in the last commit, the conditional was always false.
[...]
+> - if (flags & IFBAF_DYNAMIC)
+> + if ((flags & IFBAF_TYPEMASK) == 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))'.
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060103/1bd32d81/attachment.bin
More information about the cvs-src
mailing list