Print this page
8478 mac: suggest parentheses around '&&' within '||'
Reviewed by: Ryan Zezeski <rpz@joyent.com>
Reviewed by: Alexander Stetsenko <astetsenko@racktopsystems.com>
*** 20,29 ****
--- 20,30 ----
*/
/*
* 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,2742 ****
/*
* 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) {
err = EINVAL;
goto bail_out;
}
}
/*
--- 2730,2743 ----
/*
* 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)) {
err = EINVAL;
goto bail_out;
}
}
/*