url: Tidy up of setstropt_userpwd() parameters
Updated the naming convention of the login parameters to match those of other functions.
This commit is contained in:
parent
e8a9f794f0
commit
702b0dd408
28
lib/url.c
28
lib/url.c
@ -297,8 +297,8 @@ static CURLcode setstropt(char **charp, char *s)
|
|||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode setstropt_userpwd(char *option, char **user_storage,
|
static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp,
|
||||||
char **pwd_storage, char **options_storage)
|
char **optionsp)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
char *user = NULL;
|
char *user = NULL;
|
||||||
@ -309,28 +309,28 @@ static CURLcode setstropt_userpwd(char *option, char **user_storage,
|
|||||||
to clear the existing data */
|
to clear the existing data */
|
||||||
if(option) {
|
if(option) {
|
||||||
result = parse_login_details(option, strlen(option),
|
result = parse_login_details(option, strlen(option),
|
||||||
(user_storage ? &user : NULL),
|
(userp ? &user : NULL),
|
||||||
(pwd_storage ? &passwd : NULL),
|
(passwdp ? &passwd : NULL),
|
||||||
(options_storage ? &options : NULL));
|
(optionsp ? &options : NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!result) {
|
if(!result) {
|
||||||
/* Store the username part of option if required */
|
/* Store the username part of option if required */
|
||||||
if(user_storage) {
|
if(userp) {
|
||||||
Curl_safefree(*user_storage);
|
Curl_safefree(*userp);
|
||||||
*user_storage = user;
|
*userp = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store the password part of option if required */
|
/* Store the password part of option if required */
|
||||||
if(pwd_storage) {
|
if(passwdp) {
|
||||||
Curl_safefree(*pwd_storage);
|
Curl_safefree(*passwdp);
|
||||||
*pwd_storage = passwd;
|
*passwdp = passwd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store the options part of option if required */
|
/* Store the options part of option if required */
|
||||||
if(options_storage) {
|
if(optionsp) {
|
||||||
Curl_safefree(*options_storage);
|
Curl_safefree(*optionsp);
|
||||||
*options_storage = options;
|
*optionsp = options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user