Page MenuHomeFreeBSD

D21037.id141919.diff
No OneTemporary

D21037.id141919.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
--- a/sys/compat/linuxkpi/common/include/linux/etherdevice.h
+++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
@@ -53,7 +53,8 @@
static inline bool
is_zero_ether_addr(const u8 * addr)
{
- return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00);
+ return ((addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]) ==
+ 0x00);
}
static inline bool
@@ -65,7 +66,8 @@
static inline bool
is_broadcast_ether_addr(const u8 * addr)
{
- return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff));
+ return ((addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) ==
+ 0xff);
}
static inline bool

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 6:10 PM (4 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16203229
Default Alt Text
D21037.id141919.diff (797 B)

Event Timeline