1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

easygetopt: pass a valid enum to avoid compiler warning

"integer constant not in range of enumerated type 'CURLoption'"

Reported-by: Gisle Vanem
Bug: 6ebe63fac2 (commitcomment-42042843)

Closes #5915
This commit is contained in:
Daniel Stenberg 2020-09-05 12:52:03 +02:00
parent a86cc7e2ab
commit 879007f811
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -51,7 +51,8 @@ static struct curl_easyoption *lookup(const char *name, CURLoption id)
const struct curl_easyoption *curl_easy_option_by_name(const char *name)
{
return lookup(name, 0);
/* when name is used, the id argument is ignored */
return lookup(name, CURLOPT_LASTENTRY);
}
const struct curl_easyoption *curl_easy_option_by_id(CURLoption id)