Просмотр исходного кода

Document that sntp_setservername doesn't copy the string

I was expecting the string to be duplicated, doing a Google search
shows others did as well.
David Fries 4 лет назад
Родитель
Сommit
35cbad52cc
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/apps/sntp/sntp.c

+ 2 - 1
src/apps/sntp/sntp.c

@@ -914,7 +914,8 @@ sntp_getkodreceived(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)