mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
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:
parent
b1258bf8e6
commit
53ddb9244b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user