mirror of
https://github.com/curl/curl.git
synced 2026-07-26 01:47:15 +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
12
lib/setopt.c
12
lib/setopt.c
|
|
@ -1874,23 +1874,23 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
|
|||
if(!ptr)
|
||||
break;
|
||||
|
||||
if(strcasecompare(ptr, "ALL")) {
|
||||
if(curl_strequal(ptr, "ALL")) {
|
||||
/* clear all cookies */
|
||||
Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
|
||||
Curl_cookie_clearall(data->cookies);
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
|
||||
}
|
||||
else if(strcasecompare(ptr, "SESS")) {
|
||||
else if(curl_strequal(ptr, "SESS")) {
|
||||
/* clear session cookies */
|
||||
Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
|
||||
Curl_cookie_clearsess(data->cookies);
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
|
||||
}
|
||||
else if(strcasecompare(ptr, "FLUSH")) {
|
||||
else if(curl_strequal(ptr, "FLUSH")) {
|
||||
/* flush cookies to file, takes care of the locking */
|
||||
Curl_flush_cookies(data, FALSE);
|
||||
}
|
||||
else if(strcasecompare(ptr, "RELOAD")) {
|
||||
else if(curl_strequal(ptr, "RELOAD")) {
|
||||
/* reload cookies from file */
|
||||
Curl_cookie_loadfiles(data);
|
||||
break;
|
||||
|
|
@ -2554,12 +2554,12 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
|
|||
return Curl_setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_PROXY], ptr);
|
||||
#endif
|
||||
case CURLOPT_TLSAUTH_TYPE:
|
||||
if(ptr && !strcasecompare(ptr, "SRP"))
|
||||
if(ptr && !curl_strequal(ptr, "SRP"))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
break;
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
case CURLOPT_PROXY_TLSAUTH_TYPE:
|
||||
if(ptr && !strcasecompare(ptr, "SRP"))
|
||||
if(ptr && !curl_strequal(ptr, "SRP"))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
break;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue