Fix buildworld after r291453, similar to r284346: url->user and url->pwd

are arrays, so they can never be NULL.

Reported by:	many
Pointy hat to:	des
This commit is contained in:
Dimitry Andric 2015-11-29 22:37:48 +00:00
parent 41d4f10391
commit a1b9b1743c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291461

View File

@ -1689,10 +1689,8 @@ http_request_body(struct url *URL, const char *op, struct url_stat *us,
goto ouch;
}
} else if (fetch_netrc_auth(url) == 0) {
aparams.user = url->user ?
strdup(url->user) : strdup("");
aparams.password = url->pwd ?
strdup(url->pwd) : strdup("");
aparams.user = strdup(url->user);
aparams.password = strdup(url->pwd);
} else if (fetchAuthMethod &&
fetchAuthMethod(url) == 0) {
aparams.user = strdup(url->user);