- no pecl/event for ya
[m6w6/ext-http] / http_url_api.c
index 37c23cd6910f6b0e2dce4b64095fcc7d28e12f1f..30db604274ca4b3a7b8d9ef62998c6e6a4d17e20 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -306,9 +306,9 @@ PHP_HTTP_API void _http_build_url(int flags, const php_url *old_url, const php_u
                strlcat(*url_str, url->host, HTTP_URL_MAXLEN);
                
                if (url->port) {
-                       char port_str[8] = {0};
+                       char port_str[8];
                        
-                       snprintf(port_str, lenof(port_str), "%d", (int) url->port);
+                       snprintf(port_str, sizeof(port_str), "%d", (int) url->port);
                        strlcat(*url_str, ":", HTTP_URL_MAXLEN);
                        strlcat(*url_str, port_str, HTTP_URL_MAXLEN);
                }