]> sjero.net Git - wget/blobdiff - src/ftp-ls.c
[svn] Use the %d format to print port number, which is int.
[wget] / src / ftp-ls.c
index 913302502b7d8d187fde973c9b755bb0506a9f95..6f6eeac2a34101dc1a3bfee1b382325e993e1a6b 100644 (file)
@@ -47,6 +47,7 @@ so, delete this exception statement from your version.  */
 #include "utils.h"
 #include "ftp.h"
 #include "url.h"
+#include "convert.h"           /* for html_quote_string prototype */
 
 extern FILE *output_stream;
 
@@ -925,7 +926,7 @@ ftp_index (const char *file, struct url *u, struct fileinfo *f)
          break;
        }
       htclfile = html_quote_string (f->name);
-      fprintf (fp, "<a href=\"ftp://%s%s:%hu", upwd, u->host, u->port);
+      fprintf (fp, "<a href=\"ftp://%s%s:%d", upwd, u->host, u->port);
       if (*u->dir != '/')
        putc ('/', fp);
       fprintf (fp, "%s", u->dir);