mirror of
https://github.com/curl/curl.git
synced 2026-08-04 07:40:03 +03:00
lib: drop two interim macros in favor of native libcurl API calls
Drop `strcasecompare` and `strncasecompare` in favor of libcurl API calls `curl_strequal` and `curl_strnequal` respectively. Also drop unnecessary `strcase.h` includes. Include `curl/curl.h` instead where it wasn't included before. Closes #17772
This commit is contained in:
parent
d553f7e9f0
commit
a3787f98ac
54 changed files with 223 additions and 260 deletions
|
|
@ -730,7 +730,7 @@ static bool tailmatch(const char *full, size_t flen,
|
|||
{
|
||||
if(plen > flen)
|
||||
return FALSE;
|
||||
return strncasecompare(part, &full[flen - plen], plen);
|
||||
return curl_strnequal(part, &full[flen - plen], plen);
|
||||
}
|
||||
|
||||
static struct Curl_addrinfo *
|
||||
|
|
@ -872,8 +872,8 @@ CURLcode Curl_resolv(struct Curl_easy *data,
|
|||
goto error;
|
||||
|
||||
if(!is_ipaddr &&
|
||||
(strcasecompare(hostname, "localhost") ||
|
||||
strcasecompare(hostname, "localhost.") ||
|
||||
(curl_strequal(hostname, "localhost") ||
|
||||
curl_strequal(hostname, "localhost.") ||
|
||||
tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
|
||||
tailmatch(hostname, hostname_len, STRCONST(".localhost.")))) {
|
||||
addr = get_localhost(port, hostname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue