From: Ben Pfaff Date: Fri, 8 Jul 2011 17:47:22 +0000 (-0700) Subject: packets: Remove unneeded !! from eth_addr_is_local(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=347d48798f40f7e835082338e92eb2e5a21a39a2;p=openvswitch packets: Remove unneeded !! from eth_addr_is_local(). There's no value in using !! on an operand of && or || as done here. --- diff --git a/lib/packets.h b/lib/packets.h index 20065ade..8e13a25b 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -56,8 +56,8 @@ static inline bool eth_addr_is_local(const uint8_t ea[6]) { /* Local if it is either a locally administered address or a Nicira random * address. */ - return !!(ea[0] & 2) - || (ea[0] == 0x00 && ea[1] == 0x23 && ea[2] == 0x20 && !!(ea[3] & 0x80)); + return ea[0] & 2 + || (ea[0] == 0x00 && ea[1] == 0x23 && ea[2] == 0x20 && ea[3] & 0x80); } static inline bool eth_addr_is_zero(const uint8_t ea[6]) {