spelling: call it null-terminate consistently

With a dash, using two Ls. Also for different forms of the word.

Use NULL in all uppercase if it means a zero pointer.

Follow-up to 307b7543ea

Closes #17489
This commit is contained in:
Daniel Stenberg 2025-05-30 11:20:05 +02:00
parent 54834b4ad3
commit fe81a80ae7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
39 changed files with 69 additions and 70 deletions

View file

@ -248,7 +248,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
if(hdrcbdata->honor_cd_filename &&
hdrcbdata->config->show_headers) {
/* still awaiting the Content-Disposition header, store the header in
memory. Since it is not zero terminated, we need an extra dance. */
memory. Since it is not null-terminated, we need an extra dance. */
char *clone = aprintf("%.*s", (int)cb, str);
if(clone) {
struct curl_slist *old = hdrcbdata->headlist;
@ -440,7 +440,7 @@ void write_linked_location(CURL *curl, const char *location, size_t loclen,
if(!u)
goto locout;
/* Create a NUL-terminated and whitespace-stripped copy of Location: */
/* Create a null-terminated and whitespace-stripped copy of Location: */
copyloc = malloc(llen + 1);
if(!copyloc)
goto locout;

View file

@ -78,7 +78,7 @@ static ParameterError getstrn(char **str, const char *val,
return PARAM_NO_MEM;
memcpy(*str, val, len);
(*str)[len] = 0; /* null terminate */
(*str)[len] = 0; /* null-terminate */
return PARAM_OK;
}

View file

@ -237,10 +237,10 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
/*
* Copies the string from line to the buffer at param, unquoting
* backslash-quoted characters and NUL-terminating the output string.
* Stops at the first non-backslash-quoted double quote character or the
* end of the input string. param must be at least as long as the input
* string. Returns the pointer after the last handled input character.
* backslash-quoted characters and null-terminating the output string. Stops
* at the first non-backslash-quoted double quote character or the end of the
* input string. param must be at least as long as the input string. Returns
* the pointer after the last handled input character.
*/
static const char *unslashquote(const char *line, char *param)
{
@ -317,7 +317,7 @@ static bool get_line(FILE *input, struct dynbuf *buf, bool *error)
}
/*
* Returns a line from the given file. Every line is NULL terminated (no
* Returns a line from the given file. Every line is null-terminated (no
* newline). Skips #-commented and space/tabs-only lines automatically.
*/
bool my_get_line(FILE *input, struct dynbuf *buf, bool *error)