Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103035740
D21240.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21240.diff
View Options
Index: head/sys/dev/usb/net/if_muge.c
===================================================================
--- head/sys/dev/usb/net/if_muge.c
+++ head/sys/dev/usb/net/if_muge.c
@@ -157,9 +157,6 @@
#define muge_err_printf(sc, fmt, args...) \
device_printf((sc)->sc_ue.ue_dev, "error: " fmt, ##args)
-#define ETHER_IS_ZERO(addr) \
- (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
-
#define ETHER_IS_VALID(addr) \
(!ETHER_IS_MULTICAST(addr) && !ETHER_IS_ZERO(addr))
Index: head/sys/dev/usb/net/if_smsc.c
===================================================================
--- head/sys/dev/usb/net/if_smsc.c
+++ head/sys/dev/usb/net/if_smsc.c
@@ -171,9 +171,6 @@
device_printf((sc)->sc_ue.ue_dev, "error: " fmt, ##args)
-#define ETHER_IS_ZERO(addr) \
- (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
-
#define ETHER_IS_VALID(addr) \
(!ETHER_IS_MULTICAST(addr) && !ETHER_IS_ZERO(addr))
Index: head/sys/dev/usb/net/if_ure.c
===================================================================
--- head/sys/dev/usb/net/if_ure.c
+++ head/sys/dev/usb/net/if_ure.c
@@ -68,9 +68,6 @@
"Debug level");
#endif
-#define ETHER_IS_ZERO(addr) \
- (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
-
/*
* Various supported device vendors/products.
*/
Index: head/sys/net/ethernet.h
===================================================================
--- head/sys/net/ethernet.h
+++ head/sys/net/ethernet.h
@@ -74,6 +74,9 @@
#define ETHER_IS_BROADCAST(addr) \
(((addr)[0] & (addr)[1] & (addr)[2] & \
(addr)[3] & (addr)[4] & (addr)[5]) == 0xff)
+#define ETHER_IS_ZERO(addr) \
+ (((addr)[0] | (addr)[1] | (addr)[2] | \
+ (addr)[3] | (addr)[4] | (addr)[5]) == 0x00)
/*
* 802.1q Virtual LAN header.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 2:39 AM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14752616
Default Alt Text
D21240.diff (1 KB)
Attached To
Mode
D21240: net: add ETHER_IS_ZERO macro similar to ETHER_IS_BROADCAST
Attached
Detach File
Event Timeline
Log In to Comment