apps/sntp: Trivial build warning fix

Fix below build warning:
../../../../lwip/src/apps/sntp/sntp.c: In function ‘sntp_servermode_dhcp’:
../../../../lwip/src/apps/sntp/sntp.c:726:3: warning: ISO C90 forbids mixed declarations and code [-Wc90-c99-compat]
   u8_t new_mode = set_servers_from_dhcp ? 1 : 0;
   ^~~~

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2018-03-04 19:18:26 +08:00
parent b1258bf8e6
commit 53ddb9244b

View File

@ -722,8 +722,8 @@ sntp_getoperatingmode(void)
void
sntp_servermode_dhcp(int set_servers_from_dhcp)
{
LWIP_ASSERT_CORE_LOCKED();
u8_t new_mode = set_servers_from_dhcp ? 1 : 0;
LWIP_ASSERT_CORE_LOCKED();
if (sntp_set_servers_from_dhcp != new_mode) {
sntp_set_servers_from_dhcp = new_mode;
}