summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stormont <astormont@racktopsystems.com>2017-07-08 23:54:15 +0100
committerDan McDonald <danmcd@joyent.com>2017-07-14 10:57:41 -0400
commit76fb654b00249d6aa041522127c9503d69667164 (patch)
treeb50fc6380a18b24c9760296b3406b22701453bc2
parent6b511167e8d56a74b24bdddf2937e6453ae54d1a (diff)
downloadillumos-joyent-76fb654b00249d6aa041522127c9503d69667164.tar.gz
8478 mac: suggest parentheses around '&&' within '||'
Reviewed by: Ryan Zezeski <rpz@joyent.com> Reviewed by: Alexander Stetsenko <astetsenko@racktopsystems.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/mac/mac_client.c9
-rw-r--r--usr/src/uts/intel/mac/Makefile1
-rw-r--r--usr/src/uts/sparc/mac/Makefile1
3 files changed, 5 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/mac/mac_client.c b/usr/src/uts/common/io/mac/mac_client.c
index bc7bcd9227..efc3cb7f07 100644
--- a/usr/src/uts/common/io/mac/mac_client.c
+++ b/usr/src/uts/common/io/mac/mac_client.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
+ * Copyright 2017 RackTop Systems.
*/
/*
@@ -2731,10 +2732,10 @@ i_mac_unicast_add(mac_client_handle_t mch, uint8_t *mac_addr, uint16_t flags,
* 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;
}
diff --git a/usr/src/uts/intel/mac/Makefile b/usr/src/uts/intel/mac/Makefile
index 8346daa30b..93d232cad2 100644
--- a/usr/src/uts/intel/mac/Makefile
+++ b/usr/src/uts/intel/mac/Makefile
@@ -63,7 +63,6 @@ LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-uninitialized
-CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-type-limits
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-unused-variable
diff --git a/usr/src/uts/sparc/mac/Makefile b/usr/src/uts/sparc/mac/Makefile
index 5a2fd6834c..0995eaa299 100644
--- a/usr/src/uts/sparc/mac/Makefile
+++ b/usr/src/uts/sparc/mac/Makefile
@@ -67,7 +67,6 @@ LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-uninitialized
-CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-type-limits
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-unused-variable