Added parenthesis to provide clarity and make it obvious to anyone maintaining the code.
This commit is contained in:
@@ -166,9 +166,9 @@ int bip_send_pdu(
|
||||
|
||||
mtu[0] = BVLL_TYPE_BACNET_IP;
|
||||
bip_dest.sin_family = AF_INET;
|
||||
if (dest->net == BACNET_BROADCAST_NETWORK
|
||||
|| ((dest->net > 0) && (dest->len == 0))
|
||||
|| dest->mac_len == 0) {
|
||||
if ((dest->net == BACNET_BROADCAST_NETWORK) ||
|
||||
((dest->net > 0) && (dest->len == 0)) ||
|
||||
(dest->mac_len == 0)) {
|
||||
/* broadcast */
|
||||
address.s_addr = BIP_Broadcast_Address.s_addr;
|
||||
port = BIP_Port;
|
||||
|
||||
@@ -1144,9 +1144,9 @@ int bvlc_send_pdu(
|
||||
/* mac_len = 0 is a broadcast address */
|
||||
/* net = 0 indicates local, net = 65535 indicates global */
|
||||
/* net > 0 and net < 65535 are network specific broadcast if len = 0 */
|
||||
if ( dest->net == BACNET_BROADCAST_NETWORK
|
||||
|| ((dest->net > 0) && (dest->len == 0))
|
||||
|| dest->mac_len == 0) {
|
||||
if ((dest->net == BACNET_BROADCAST_NETWORK) ||
|
||||
((dest->net > 0) && (dest->len == 0)) ||
|
||||
(dest->mac_len == 0)) {
|
||||
/* if we are a foreign device */
|
||||
if (Remote_BBMD.sin_port) {
|
||||
mtu[1] = BVLC_DISTRIBUTE_BROADCAST_TO_NETWORK;
|
||||
|
||||
Reference in New Issue
Block a user