fix VLAN_ATTACHED() macro, it was always true due to condition bug

Fixes PR kern/32645 by Pavel Cahyna
This commit is contained in:
jdolecek 2006-01-29 09:57:59 +00:00
parent 0a5be6a731
commit 8ce024013a
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ether.h,v 1.40 2005/12/10 23:21:38 elad Exp $ */ /* $NetBSD: if_ether.h,v 1.41 2006/01/29 09:57:59 jdolecek Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1993 * Copyright (c) 1982, 1986, 1993
@ -274,7 +274,7 @@ struct ether_multistep {
((*(u_int *)(mtag + 1)) & 4095) ((*(u_int *)(mtag + 1)) & 4095)
/* test if any VLAN is configured for this interface */ /* test if any VLAN is configured for this interface */
#define VLAN_ATTACHED(ec) (&(ec)->ec_nvlans > 0) #define VLAN_ATTACHED(ec) ((ec)->ec_nvlans > 0)
void ether_ifattach(struct ifnet *, const u_int8_t *); void ether_ifattach(struct ifnet *, const u_int8_t *);
void ether_ifdetach(struct ifnet *); void ether_ifdetach(struct ifnet *);