Skip to content

Commit 36f671b

Browse files
cakturkJonathan Corbet
authored andcommitted
Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
In the actual implementation ether_addr_equal function tests for equality to 0 when returning. It seems in commit 0d74c4 it is somehow overlooked to change this operator to reflect the actual function. Signed-off-by: Cihangir Akturk <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
1 parent 6611533 commit 36f671b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/unaligned-memory-access.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
151151
#else
152152
const u16 *a = (const u16 *)addr1;
153153
const u16 *b = (const u16 *)addr2;
154-
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
154+
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
155155
#endif
156156
}
157157

0 commit comments

Comments
 (0)