Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544024

Documentation/unaligned-memory-access.txt: fix incorrect comparison operator

From Cihangir Akturk <cakturk@gmail.com>
Newsgroups linux.kernel
Subject Documentation/unaligned-memory-access.txt: fix incorrect comparison operator
Date 2016-12-17 18:50 +0100
Message-ID <sPrho-4eD-31@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 <cakturk@gmail.com>
---
 Documentation/unaligned-memory-access.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/unaligned-memory-access.txt b/Documentation/unaligned-memory-access.txt
index a445da0..3f76c0c 100644
--- a/Documentation/unaligned-memory-access.txt
+++ b/Documentation/unaligned-memory-access.txt
@@ -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
 }
 
-- 
2.1.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Documentation/unaligned-memory-access.txt: fix incorrect comparison operator Cihangir Akturk <cakturk@gmail.com> - 2016-12-17 18:50 +0100
  Re: Documentation/unaligned-memory-access.txt: fix incorrect comparison operator Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-18 00:00 +0100
    Re: Documentation/unaligned-memory-access.txt: fix incorrect  comparison operator Cihangir Akturk <cakturk@gmail.com> - 2016-12-20 01:30 +0100
      Re: Documentation/unaligned-memory-access.txt: fix incorrect comparison operator Ozgur Karatas <okaratas@member.fsf.org> - 2016-12-20 11:00 +0100
  Re: Documentation/unaligned-memory-access.txt: fix incorrect  comparison operator Jonathan Corbet <corbet@lwn.net> - 2016-12-27 21:10 +0100

csiph-web