Skip to content

Commit

Permalink
Document that sntp_setservername doesn't copy the string
Browse files Browse the repository at this point in the history
I was expecting the string to be duplicated, doing a Google search
shows others did as well.
  • Loading branch information
dfries authored and goldsimon committed Oct 12, 2023
1 parent 574bd6e commit 35cbad5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/apps/sntp/sntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35cbad5

Please sign in to comment.