]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Concatenate strings using concat_strings.
[wget] / src / ftp.c
index a95e83897f628870d381037fe047f476ac6a2135..d2e031e731f8b3e863cbc25be01e978a0ba5663c 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -271,8 +271,7 @@ getftp (struct url *u, wgint *len, wgint restval, ccon *con)
       if (con->proxy)
        {
          /* If proxy is in use, log in as username@target-site. */
-         logname = xmalloc (strlen (user) + 1 + strlen (u->host) + 1);
-         sprintf (logname, "%s@%s", user, u->host);
+         logname = concat_strings (user, "@", u->host, (char *) 0);
        }
 
       /* Login to the server: */