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:
Joel Cunningham
2017-12-13 11:34:48 -06:00
parent 60063b98e1
commit 920ee2d07e
2 changed files with 5 additions and 5 deletions

View File

@@ -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