You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2007/12/08 17:10:42 UTC

svn commit: r602491 - /httpd/httpd/trunk/server/protocol.c

Author: jim
Date: Sat Dec  8 08:10:40 2007
New Revision: 602491

URL: http://svn.apache.org/viewvc?rev=602491&view=rev
Log:
Alternate fix... profiling indicates that the string
termination is completely unneeded and superflous. In
which case, the original allocation size is sufficient
since nothing external worries about a NULL nor
looks for it.

Modified:
    httpd/httpd/trunk/server/protocol.c

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=602491&r1=602490&r2=602491&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Sat Dec  8 08:10:40 2007
@@ -1525,7 +1525,7 @@
 {
     apr_size_t written;
     struct ap_vrprintf_data vd;
-    char vrprintf_buf[AP_IOBUFSIZE+1];
+    char vrprintf_buf[AP_IOBUFSIZE];
 
     vd.vbuff.curpos = vrprintf_buf;
     vd.vbuff.endpos = vrprintf_buf + AP_IOBUFSIZE;
@@ -1536,9 +1536,6 @@
         return -1;
 
     written = apr_vformatter(r_flush, &vd.vbuff, fmt, va);
-
-    /* tack on null terminator on remaining string */
-    *(vd.vbuff.curpos) = '\0';
 
     if (written != -1) {
         int n = vd.vbuff.curpos - vrprintf_buf;