From 3f3af6a0722f07319b7af5ba7eb0e9c7ae21c79d Mon Sep 17 00:00:00 2001 From: cneilson Date: Fri, 3 Sep 2010 16:48:24 +0000 Subject: [PATCH] Moved variable definitions to top of functions (variables can, only be defined partway thru in C++ not C) --- bacnet-stack/demo/handler/s_whois.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/demo/handler/s_whois.c b/bacnet-stack/demo/handler/s_whois.c index f200c32e..0c2ea97d 100644 --- a/bacnet-stack/demo/handler/s_whois.c +++ b/bacnet-stack/demo/handler/s_whois.c @@ -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];