Print this page
8478 mac: suggest parentheses around '&&' within '||'
Reviewed by: Ryan Zezeski <rpz@joyent.com>
Reviewed by: Alexander Stetsenko <astetsenko@racktopsystems.com>

@@ -20,10 +20,11 @@
  */
 
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
+ * Copyright 2017 RackTop Systems.
  */
 
 /*
  * - General Introduction:
  *

@@ -2729,14 +2730,14 @@
                 /*
                  * Make sure the client is consistent about its requests
                  * for MAC addresses. I.e. all requests from the clients
                  * must have the MAC_UNICAST_HW flag set or clear.
                  */
-                if ((mcip->mci_state_flags & MCIS_UNICAST_HW) != 0 &&
-                    !is_unicast_hw ||
-                    (mcip->mci_state_flags & MCIS_UNICAST_HW) == 0 &&
-                    is_unicast_hw) {
+                if (((mcip->mci_state_flags & MCIS_UNICAST_HW) != 0 &&
+                    !is_unicast_hw) ||
+                    ((mcip->mci_state_flags & MCIS_UNICAST_HW) == 0 &&
+                    is_unicast_hw)) {
                         err = EINVAL;
                         goto bail_out;
                 }
         }
         /*