]> granicus.if.org Git - apache/commitdiff
Eliminate some sprintf calls
authorBrian Pane <brianp@apache.org>
Wed, 1 May 2002 06:41:36 +0000 (06:41 +0000)
committerBrian Pane <brianp@apache.org>
Wed, 1 May 2002 06:41:36 +0000 (06:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94885 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index 03e89481cfa4f57f96398c3ee8623ab733adddb5..aadc19288afe8d2730ba69862416a0f43eadd3fd 100644 (file)
@@ -760,7 +760,7 @@ static void fix_hostname(request_rec *r)
          * here to judge; apr_parse_addr_port() would think we had a port
          * but no address
          */
-        host = apr_psprintf(r->pool, "%d", (int)port);
+        host = apr_itoa(r->pool, (int)port);
     }
     else if (port) {
         /* Don't throw the Host: header's port number away:
@@ -769,7 +769,7 @@ static void fix_hostname(request_rec *r)
         *         Like r->hostname, there should be a r->portno
         */
         r->parsed_uri.port = port;
-       r->parsed_uri.port_str = apr_psprintf(r->pool, "%d", (int)port);
+       r->parsed_uri.port_str = apr_itoa(r->pool, (int)port);
     }
 
     /* if the hostname is an IPv6 numeric address string, it was validated