diff --git a/docs/examples/log_failed_transfers.c b/docs/examples/log_failed_transfers.c index fb6dea6aca..3279703176 100644 --- a/docs/examples/log_failed_transfers.c +++ b/docs/examples/log_failed_transfers.c @@ -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; diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index 8ee5559068..02cbefa0e5 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -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, diff --git a/docs/internals/BUFREF.md b/docs/internals/BUFREF.md index 46f7ee6b3e..09413dea03 100644 --- a/docs/internals/BUFREF.md +++ b/docs/internals/BUFREF.md @@ -101,4 +101,4 @@ char *Curl_bufref_dup(const struct bufref *br); ``` Returns a strdup() version of the buffer. Note that this assumes that the -bufref is null terminated. +bufref is null-terminated. diff --git a/lib/curlx/base64.c b/lib/curlx/base64.c index a7a6703099..7f51576f50 100644 --- a/lib/curlx/base64.c +++ b/lib/curlx/base64.c @@ -149,7 +149,7 @@ CURLcode curlx_base64_decode(const char *src, pos += 3 - padding; } - /* Zero terminate */ + /* Null-terminate */ *pos = '\0'; /* Return the decoded data */ @@ -213,7 +213,7 @@ static CURLcode base64_encode(const char *table64, } } - /* Zero terminate */ + /* Null-terminate */ *output = '\0'; /* Return the pointer to the new data (allocated memory) */ diff --git a/lib/http.c b/lib/http.c index 6083c2c4ba..aa34b5d14f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -4187,7 +4187,7 @@ static CURLcode http_rw_hd(struct Curl_easy *data, CURLcode result = CURLE_OK; struct SingleRequest *k = &data->req; int writetype; - DEBUGASSERT(!hd[hdlen]); /* null terminated */ + DEBUGASSERT(!hd[hdlen]); /* null-terminated */ *pconsumed = 0; if((0x0a == *hd) || (0x0d == *hd)) { @@ -4548,7 +4548,7 @@ CURLcode Curl_http_write_resp_hd(struct Curl_easy *data, CURLcode result; size_t consumed; char tmp = 0; - DEBUGASSERT(!hd[hdlen]); /* null terminated */ + DEBUGASSERT(!hd[hdlen]); /* null-terminated */ result = http_rw_hd(data, hd, hdlen, &tmp, 0, &consumed); if(!result && is_eos) { diff --git a/lib/transfer.c b/lib/transfer.c index 63c8fcd4db..5c96aed7d6 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -794,7 +794,7 @@ CURLcode Curl_xfer_write_resp_hd(struct Curl_easy *data, const char *hd0, size_t hdlen, bool is_eos) { if(data->conn->scheme->run->write_resp_hd) { - DEBUGASSERT(!hd0[hdlen]); /* null terminated */ + DEBUGASSERT(!hd0[hdlen]); /* null-terminated */ /* protocol handlers offering this function take full responsibility * for writing all received download data to the client. */ return data->conn->scheme->run->write_resp_hd(data, hd0, hdlen, is_eos); diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index b12e23481b..7909467dea 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -517,7 +517,7 @@ static CURLcode mbed_load_cacert(struct Curl_cfilter *cf, curlx_free(newblob); } #else - /* DER encoded certs do not need to be null terminated because it is a + /* DER encoded certs do not need to be null-terminated because it is a binary format. Thus, if we are not compiling with PEM_PARSE we can avoid the extra memory copies altogether. */ ret = mbedtls_x509_crt_parse_der(&backend->cacert, ca_info_blob->data, @@ -630,7 +630,7 @@ static CURLcode mbed_load_clicert(struct Curl_cfilter *cf, curlx_free(newblob); } #else - /* DER encoded certs do not need to be null terminated because it is a + /* DER encoded certs do not need to be null-terminated because it is a binary format. Thus, if we are not compiling with PEM_PARSE we can avoid the extra memory copies altogether. */ ret = mbedtls_x509_crt_parse_der(&backend->clicert, ssl_cert_blob->data, diff --git a/scripts/badwords.txt b/scripts/badwords.txt index 7a57016dca..414d67a7d2 100644 --- a/scripts/badwords.txt +++ b/scripts/badwords.txt @@ -19,6 +19,8 @@ wild card:wildcard thread safe:thread-safe thread unsafe:thread-unsafe multi thread:multi-thread +null terminated:null-terminated +zero terminated:null-terminated it's:it is aren't:are not can't:cannot