1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] url.c (str_url): Clarified this function's comment header after Hrvoje answered

my question on the list as to when hide != 1.  Also Hrvoje pointed out I need to
use xstrdup() on the string literal.
This commit is contained in:
dan 2001-01-10 22:16:46 -08:00
parent 3f91c7dfe1
commit fa636eb71d
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2001-01-10 Dan Harkless <wget@harkless.org>
* url.c (str_url): Clarified this function's comment header after
Hrvoje answered my question on the list as to when hide != 1.
Also Hrvoje pointed out I need to use xstrdup() on the string literal.
2001-01-06 Hrvoje Niksic <hniksic@arsdigita.com>
* connect.c (bindport): Declare addrlen as int. Diagnosed by

View File

@ -661,10 +661,11 @@ process_ftp_type (char *path)
return '\0';
}
/* Return the URL as fine-formed string, with a proper protocol,
optional port number, directory and optional user/password. If
HIDE is non-zero, password will be hidden. The forbidden
characters in the URL will be cleansed. */
/* Return the URL as fine-formed string, with a proper protocol, optional port
number, directory and optional user/password. If `hide' is non-zero (as it
is when we're calling this on a URL we plan to print, but not when calling it
to canonicalize a URL for use within the program), password will be hidden.
The forbidden characters in the URL will be cleansed. */
char *
str_url (const struct urlinfo *u, int hide)
{
@ -693,7 +694,7 @@ str_url (const struct urlinfo *u, int hide)
shoulder (or in saved wget output). Don't give away the number of
characters in the password, either, as we did in past versions of
this code, when we replaced the password characters with 'x's. */
passwd = "<password>";
passwd = xstrdup("<password>");
else
passwd = CLEANDUP (u->passwd);
}