mirror of
https://github.com/curl/curl.git
synced 2026-07-30 22:18:04 +03:00
badwords: prefer 'null-terminated'
Aligning with existing text. Closes #20979
This commit is contained in:
parent
a3699e8b9e
commit
454db7aeee
8 changed files with 13 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue