Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108593605
D21037.id141919.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
797 B
Referenced Files
None
Subscribers
None
D21037.id141919.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D21037: linuxpki: correct is_{zero,broadcast}_ether_addr
Attached
Detach File
Event Timeline
Log In to Comment