Bugfix/clang tidy applied 2022 (#232)

* clang-tidy applied fixes to src folder
* clang-tidy applied fixes to apps folder

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-02-27 19:14:17 -06:00
committed by GitHub
parent 5e70eeecfc
commit d0fe77c030
33 changed files with 211 additions and 123 deletions
+12 -7
View File
@@ -129,16 +129,18 @@ uint16_t process_network_message(BACMSG *msg, MSG_DATA *data, uint8_t **buff)
add_dnet(&srcport->route_info, net,
data->src); /* and update routing table */
if (data->pdu[apdu_offset + i + 3] >
0) /* find next NET value */
0) { /* find next NET value */
i = data->pdu[apdu_offset + i + 3] + 4;
else
} else {
i = i + 4;
}
}
buff_len = create_network_message(
NETWORK_MESSAGE_INIT_RT_TABLE_ACK, data, buff, NULL);
} else
} else {
buff_len = create_network_message(
NETWORK_MESSAGE_INIT_RT_TABLE_ACK, data, buff, &buff);
}
break;
case NETWORK_MESSAGE_INIT_RT_TABLE_ACK:
@@ -152,10 +154,11 @@ uint16_t process_network_message(BACMSG *msg, MSG_DATA *data, uint8_t **buff)
add_dnet(&srcport->route_info, net,
data->src); /* and update routing table */
if (data->pdu[apdu_offset + i + 3] >
0) /* find next NET value */
0) { /* find next NET value */
i = data->pdu[apdu_offset + i + 3] + 4;
else
} else {
i = i + 4;
}
}
}
break;
@@ -202,8 +205,9 @@ uint16_t create_network_message(
bool data_expecting_reply = false;
BACNET_NPDU_DATA npdu_data;
if (network_message_type == NETWORK_MESSAGE_INIT_RT_TABLE)
if (network_message_type == NETWORK_MESSAGE_INIT_RT_TABLE) {
data_expecting_reply = true;
}
init_npdu(&npdu_data, network_message_type, data_expecting_reply);
*buff = (uint8_t *)malloc(128); /* resolve different length */
@@ -276,8 +280,9 @@ uint16_t create_network_message(
port = port->next;
}
}
} else
} else {
(*buff)[buff_len++] = (uint8_t)0;
}
break;
case NETWORK_MESSAGE_INVALID: