mirror of
https://github.com/curl/curl.git
synced 2026-05-14 21:26:21 +03:00
build: constify memchr()/strchr()/etc result variables (cont.)
Assisted-by: Rudi Heitbaum Fixes #20420 Follow-up to7dc60bdb90#20425 Follow-up to0e2507a3c6#20421 Closes #20428
This commit is contained in:
parent
6974bd7cc8
commit
4e5908306a
7 changed files with 9 additions and 9 deletions
|
|
@ -116,7 +116,7 @@ CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename)
|
|||
/* We only want the part of the local path that is on the right
|
||||
side of the rightmost slash and backslash. */
|
||||
const char *filep = strrchr(filename, '/');
|
||||
char *file2 = strrchr(filep ? filep : filename, '\\');
|
||||
const char *file2 = strrchr(filep ? filep : filename, '\\');
|
||||
char *encfile;
|
||||
|
||||
if(file2)
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ static CURLcode peek_ipv6(const char *str, size_t *skip, bool *ipv6p)
|
|||
*/
|
||||
char hostname[MAX_IP6LEN];
|
||||
CURLU *u;
|
||||
char *endbr = strchr(str, ']');
|
||||
const char *endbr = strchr(str, ']');
|
||||
size_t hlen;
|
||||
CURLUcode rc;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
|
|
|||
|
|
@ -734,10 +734,10 @@ void ourWriteOut(struct OperationConfig *config, struct per_transfer *per,
|
|||
}
|
||||
else {
|
||||
/* this is meant as a variable to output */
|
||||
char *end;
|
||||
const char *end;
|
||||
size_t vlen;
|
||||
if('{' == ptr[1]) {
|
||||
struct writeoutvar *wv = NULL;
|
||||
const struct writeoutvar *wv = NULL;
|
||||
struct writeoutvar find = { 0 };
|
||||
end = strchr(ptr, '}');
|
||||
ptr += 2; /* pass the % and the { */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue