]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
doc: Fix comparison operator
authorOlaf Mandel <o.mandel@menlosystems.com>
Fri, 10 Oct 2014 22:25:46 +0000 (00:25 +0200)
committerTom Rini <trini@ti.com>
Mon, 27 Oct 2014 15:04:00 +0000 (11:04 -0400)
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 <o.mandel@menlosystems.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
doc/README.unaligned-memory-access.txt

index 00529f5dac763a9e809cf409eaa23330e82e06fd..70a85f9cfe05ed6535aeb9594cbb8cb0bffa7cc2 100644 (file)
@@ -154,7 +154,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
 }