packets: Remove unneeded !! from eth_addr_is_local().
authorBen Pfaff <blp@nicira.com>
Fri, 8 Jul 2011 17:47:22 +0000 (10:47 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 8 Jul 2011 17:47:22 +0000 (10:47 -0700)
There's no value in using !! on an operand of && or || as done here.

lib/packets.h

index 20065ad..8e13a25 100644 (file)
@@ -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])
 {