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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to