Date: Sun, 29 Nov 2015 22:37:48 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291461 - head/lib/libfetch Message-ID: <201511292237.tATMbmER057296@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Nov 29 22:37:48 2015 New Revision: 291461 URL: https://svnweb.freebsd.org/changeset/base/291461 Log: 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 Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Sun Nov 29 21:42:26 2015 (r291460) +++ head/lib/libfetch/http.c Sun Nov 29 22:37:48 2015 (r291461) @@ -1689,10 +1689,8 @@ http_request_body(struct url *URL, const 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511292237.tATMbmER057296>