Moved variable definitions to top of functions (variables can, only be defined partway thru in C++ not C)
This commit is contained in:
@@ -123,6 +123,8 @@ void Send_WhoIs_Local(
|
|||||||
int32_t high_limit)
|
int32_t high_limit)
|
||||||
{
|
{
|
||||||
BACNET_ADDRESS dest;
|
BACNET_ADDRESS dest;
|
||||||
|
char temp[6];
|
||||||
|
int loop;
|
||||||
|
|
||||||
if (!dcc_communication_enabled())
|
if (!dcc_communication_enabled())
|
||||||
return;
|
return;
|
||||||
@@ -136,7 +138,6 @@ void Send_WhoIs_Local(
|
|||||||
|
|
||||||
/* Not sure why this happens but values are backwards so they need to be reversed */
|
/* Not sure why this happens but values are backwards so they need to be reversed */
|
||||||
|
|
||||||
char temp[6];
|
|
||||||
temp[0] = dest.mac[3];
|
temp[0] = dest.mac[3];
|
||||||
temp[1] = dest.mac[2];
|
temp[1] = dest.mac[2];
|
||||||
temp[2] = dest.mac[1];
|
temp[2] = dest.mac[1];
|
||||||
@@ -144,7 +145,6 @@ void Send_WhoIs_Local(
|
|||||||
temp[4] = dest.mac[5];
|
temp[4] = dest.mac[5];
|
||||||
temp[5] = dest.mac[4];
|
temp[5] = dest.mac[4];
|
||||||
|
|
||||||
int loop;
|
|
||||||
|
|
||||||
for (loop = 0; loop < 6; loop++) {
|
for (loop = 0; loop < 6; loop++) {
|
||||||
dest.mac[loop] = temp[loop];
|
dest.mac[loop] = temp[loop];
|
||||||
|
|||||||
Reference in New Issue
Block a user