mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-14 04:06:35 +08:00
sntp: use const for servername
This adds const to the sntp servername get/set API and internal storage SNTP's usage of this name is read only and SNTP only passes it to dns_gethostbyname() This was found by compiling with GCC -Wwrite-strings which makes the literal SNTP_SERVER_ADDRESS a const string. This then produced warnings with sntp_init()'s call to sntp_setservername()
This commit is contained in:
@@ -59,8 +59,8 @@ void sntp_setserver(u8_t idx, const ip_addr_t *addr);
|
||||
const ip_addr_t* sntp_getserver(u8_t idx);
|
||||
|
||||
#if SNTP_SERVER_DNS
|
||||
void sntp_setservername(u8_t idx, char *server);
|
||||
char *sntp_getservername(u8_t idx);
|
||||
void sntp_setservername(u8_t idx, const char *server);
|
||||
const char *sntp_getservername(u8_t idx);
|
||||
#endif /* SNTP_SERVER_DNS */
|
||||
|
||||
#if SNTP_GET_SERVERS_FROM_DHCP
|
||||
|
||||
Reference in New Issue
Block a user