You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2006/07/23 11:05:23 UTC

svn commit: r424692 - /apr/apr/branches/1.2.x/strings/apr_snprintf.c

Author: jorton
Date: Sun Jul 23 02:05:22 2006
New Revision: 424692

URL: http://svn.apache.org/viewvc?rev=424692&view=rev
Log:
* strings/apr_snprintf.c: Revert separate change which snuck into the 
r420858 merge (r423838).

Modified:
    apr/apr/branches/1.2.x/strings/apr_snprintf.c

Modified: apr/apr/branches/1.2.x/strings/apr_snprintf.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/strings/apr_snprintf.c?rev=424692&r1=424691&r2=424692&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/strings/apr_snprintf.c (original)
+++ apr/apr/branches/1.2.x/strings/apr_snprintf.c Sun Jul 23 02:05:22 2006
@@ -463,8 +463,7 @@
 }
 
 
-/* Must be passed a buffer of size NUM_BUF_SIZE where buf_end points
- * to 1 byte past the end of the buffer. */
+
 static char *conv_apr_sockaddr(apr_sockaddr_t *sa, char *buf_end, apr_size_t *len)
 {
     char *p = buf_end;
@@ -474,14 +473,7 @@
 
     p = conv_10(sa->port, TRUE, &is_negative, p, &sub_len);
     *--p = ':';
-    ipaddr_str = buf_end - NUM_BUF_SIZE;
-    if (apr__sockaddr_ip_getbuf(ipaddr_str, sa->addr_str_len, sa)) {
-        /* Should only fail if the buffer is too small, which it
-         * should not be; but fail safe anyway: */
-        *--p = '?';
-        *len = buf_end - p;
-        return p;
-    }
+    apr_sockaddr_ip_get(&ipaddr_str, sa);
     sub_len = strlen(ipaddr_str);
 #if APR_HAVE_IPV6
     if (sa->family == APR_INET6 &&