doc: Fix comparison operator
PATCH 1/1 doc: Fix comparison operator
From: Olaf Mandel <[email protected]>
Align the documentation with the include/linux/etherdevice.h , which is where this example comes from. The return value from the check was inverted in the documentation.
Signed-off-by Olaf Mandel <[email protected]>
Signed-off-by Marek Vasut <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Joe Perches <[email protected]>
--- Documentation/unaligned-memory-access.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/unaligned-memory-access.txt +1 -1
@@ -151,7 +151,7 @@ bool ether_addr_equal(const u8 *addr1, const u8 *addr2) #else const u16 *a = (const u16 *)addr1; const u16 *b = (const u16 *)addr2; - return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; + return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0; #endif }
Signature · 1 line
2.0.0