diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-06-25 11:38:25 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-06-25 11:45:17 +0200 |
commit | d6c67eae703575387b1d5be5e9cd110d04914cab (patch) | |
tree | beef06c929271c248242e78e179e5d6d0f2957f9 /tests/libtest | |
parent | 8acfb932ef9be1209491bc68d38445c4d6eaab6e (diff) | |
download | curl-bagder/null-terminate.tar.gz |
terminology: call them null-terminated stringsbagder/null-terminate
Updated terminology in docs, comments and phrases to refer to C strings
as "null-terminated". Done to unify with how most other C oriented docs
refer of them and what users in general seem to prefer (based on a
single highly unscientific poll on twitter).
Reported-by: coinhubs on github
Fixes #5598
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib547.c | 2 | ||||
-rw-r--r-- | tests/libtest/lib553.c | 4 | ||||
-rw-r--r-- | tests/libtest/lib651.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/libtest/lib547.c b/tests/libtest/lib547.c index 85e8e0c1e..1416f895c 100644 --- a/tests/libtest/lib547.c +++ b/tests/libtest/lib547.c @@ -101,7 +101,7 @@ int test(char *URL) test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_HEADER, 1L); #ifdef LIB548 - /* set the data to POST with a mere pointer to a zero-terminated string */ + /* set the data to POST with a mere pointer to a null-terminated string */ test_setopt(curl, CURLOPT_POSTFIELDS, UPLOADTHIS); #else /* 547 style, which means reading the POST data from a callback */ diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c index 95b5ac393..015bf29ac 100644 --- a/tests/libtest/lib553.c +++ b/tests/libtest/lib553.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -77,7 +77,7 @@ int test(char *URL) for(i = 0; i < NUM_HEADERS; i++) { int len = msnprintf(buf, sizeof(buf), "Header%d: ", i); memset(&buf[len], 'A', SIZE_HEADERS); - buf[len + SIZE_HEADERS] = 0; /* zero terminate */ + buf[len + SIZE_HEADERS] = 0; /* null-terminate */ hl = curl_slist_append(headerlist, buf); if(!hl) goto test_cleanup; diff --git a/tests/libtest/lib651.c b/tests/libtest/lib651.c index 18bcaae83..777f6f59b 100644 --- a/tests/libtest/lib651.c +++ b/tests/libtest/lib651.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -40,7 +40,7 @@ int test(char *URL) for(i = 0; i < size ; i++) memset(&buffer[i * 1000], 65 + i, 1000); - buffer[ sizeof(buffer)-1] = 0; /* zero terminate */ + buffer[ sizeof(buffer)-1] = 0; /* null-terminate */ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); |