badwords: prefer 'null-terminated'

Aligning with existing text.

Closes #20979
This commit is contained in:
Viktor Szakats 2026-03-18 11:29:53 +01:00
parent a3699e8b9e
commit 454db7aeee
No known key found for this signature in database
8 changed files with 13 additions and 11 deletions

View file

@ -54,7 +54,7 @@
#endif
struct mem {
/* 'buf' points to memory contents that is always zero terminated so that it
/* 'buf' points to memory contents that is always null-terminated so that it
can be treated like a string if appropriate. 'recent' points to the most
recent data written to 'buf'. */
char *buf, *recent;

View file

@ -114,7 +114,7 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
return nmemb * size;
}
/* Remember: do not assume headers are passed on null terminated! */
/* Remember: do not assume headers are passed on null-terminated! */
static size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
void *stream)
{
@ -135,7 +135,7 @@ static size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
*TmpStr1 = 0;
*TmpStr2 = 0;
if(nmemb && (field[nmemb] == '\n')) {
field[nmemb] = 0; /* null terminated */
field[nmemb] = 0; /* null-terminated */
RetVal = sscanf(field, "Date: %25s %hu %25s %hu %hu:%hu:%hu",
TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
&SYSTime.wHour, &SYSTime.wMinute,