Moved variable definitions to top of functions (variables can, only be defined partway thru in C++ not C)

This commit is contained in:
cneilson
2010-09-03 16:48:24 +00:00
parent 50a8a3f2fb
commit 3f3af6a072
+2 -2
View File
@@ -123,6 +123,8 @@ void Send_WhoIs_Local(
int32_t high_limit)
{
BACNET_ADDRESS dest;
char temp[6];
int loop;
if (!dcc_communication_enabled())
return;
@@ -136,7 +138,6 @@ void Send_WhoIs_Local(
/* Not sure why this happens but values are backwards so they need to be reversed */
char temp[6];
temp[0] = dest.mac[3];
temp[1] = dest.mac[2];
temp[2] = dest.mac[1];
@@ -144,7 +145,6 @@ void Send_WhoIs_Local(
temp[4] = dest.mac[5];
temp[5] = dest.mac[4];
int loop;
for (loop = 0; loop < 6; loop++) {
dest.mac[loop] = temp[loop];