mirror of
https://github.com/curl/curl.git
synced 2026-08-08 03:02:55 +03:00
terminology: call them null-terminated strings
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 Closes #5608
This commit is contained in:
parent
ff43fb6dec
commit
032e838b73
107 changed files with 139 additions and 139 deletions
10
lib/dotdot.c
10
lib/dotdot.c
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, 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
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
* Curl_dedotdotify()
|
||||
* @unittest: 1395
|
||||
*
|
||||
* This function gets a zero-terminated path with dot and dotdot sequences
|
||||
* This function gets a null-terminated path with dot and dotdot sequences
|
||||
* passed in and strips them off according to the rules in RFC 3986 section
|
||||
* 5.2.4.
|
||||
*
|
||||
|
|
@ -62,7 +62,7 @@ char *Curl_dedotdotify(const char *input)
|
|||
if(!out)
|
||||
return NULL; /* out of memory */
|
||||
|
||||
*out = 0; /* zero terminates, for inputs like "./" */
|
||||
*out = 0; /* null-terminates, for inputs like "./" */
|
||||
|
||||
/* get a cloned copy of the input */
|
||||
clone = strdup(input);
|
||||
|
|
@ -129,7 +129,7 @@ char *Curl_dedotdotify(const char *input)
|
|||
if(*outptr == '/')
|
||||
break;
|
||||
}
|
||||
*outptr = 0; /* zero-terminate where it stops */
|
||||
*outptr = 0; /* null-terminate where it stops */
|
||||
}
|
||||
else if(!strcmp("/..", clone)) {
|
||||
clone[2]='/';
|
||||
|
|
@ -141,7 +141,7 @@ char *Curl_dedotdotify(const char *input)
|
|||
if(*outptr == '/')
|
||||
break;
|
||||
}
|
||||
*outptr = 0; /* zero-terminate where it stops */
|
||||
*outptr = 0; /* null-terminate where it stops */
|
||||
}
|
||||
|
||||
/* D. if the input buffer consists only of "." or "..", then remove
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue