apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r376823 - /apr/apr/branches/1.2.x/test/testsock.c
Date Fri, 10 Feb 2006 20:04:30 GMT
Author: wrowe
Date: Fri Feb 10 12:04:27 2006
New Revision: 376823

URL: http://svn.apache.org/viewcvs?rev=376823&view=rev
Log:

  Revert this 1.3-specific syntax, we still need to use buffers
  to parse IP addy's in 1.2.x and prior.  Per jorton.

Modified:
    apr/apr/branches/1.2.x/test/testsock.c

Modified: apr/apr/branches/1.2.x/test/testsock.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testsock.c?rev=376823&r1=376822&r2=376823&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testsock.c (original)
+++ apr/apr/branches/1.2.x/test/testsock.c Fri Feb 10 12:04:27 2006
@@ -212,7 +212,7 @@
     apr_status_t rv;
     apr_socket_t *ld, *sd, *cd;
     apr_sockaddr_t *sa, *ca;
-    char *a, *b;
+    char a[128], b[128];
 
     ld = setup_socket(tc);
 
@@ -257,8 +257,8 @@
     APR_ASSERT_SUCCESS(tc, "get remote address of client socket",
                        apr_socket_addr_get(&ca, APR_REMOTE, cd));
     
-    a = apr_psprintf(p, "%pI", sa);
-    b = apr_psprintf(p, "%pI", ca);
+    apr_snprintf(a, sizeof(a), "%pI", sa);
+    apr_snprintf(b, sizeof(b), "%pI", ca);
 
     ABTS_STR_EQUAL(tc, a, b);
                        



Mime
View raw message