From 54acdb598ec3bcb9e476d779e5240adb783b8da3 Mon Sep 17 00:00:00 2001 From: David Fries Date: Wed, 18 Aug 2021 00:19:40 -0500 Subject: [PATCH] Document that sntp_setservername doesn't copy the string I was expecting the string to be duplicate, doing a Google search shows others did as well. --- src/apps/sntp/sntp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/sntp/sntp.c b/src/apps/sntp/sntp.c index 717552d8..10cb14a2 100644 --- a/src/apps/sntp/sntp.c +++ b/src/apps/sntp/sntp.c @@ -867,7 +867,8 @@ sntp_getserver(u8_t idx) * Initialize one of the NTP servers by name * * @param idx the index of the NTP server to set must be < SNTP_MAX_SERVERS - * @param server DNS name of the NTP server to set, to be resolved at contact time + * @param server DNS name of the NTP server to set, to be resolved at contact + * time. Note sntp stores the pointer, it doesn't copy the string. */ void sntp_setservername(u8_t idx, const char *server)