subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1332370 - /subversion/trunk/subversion/libsvn_subr/stream.c
Date Mon, 30 Apr 2012 20:24:33 GMT
Author: ivan
Date: Mon Apr 30 20:24:33 2012
New Revision: 1332370

URL: http://svn.apache.org/viewvc?rev=1332370&view=rev
Log:
Drop minor optimization from svn_stream_printf() made in r1325489, since all
current code uses svn_stream_puts() to write static strings to stream.

* subversion/libsvn_subr/stream.c
  (svn_stream_printf): Don't check for '%' in fmt.

Modified:
    subversion/trunk/subversion/libsvn_subr/stream.c

Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1332370&r1=1332369&r2=1332370&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Mon Apr 30 20:24:33 2012
@@ -229,15 +229,9 @@ svn_stream_printf(svn_stream_t *stream,
   const char *message;
   va_list ap;
 
-  /* any format controls or is this a static string? */
-  if (strchr(fmt, '%'))
-    {
-      va_start(ap, fmt);
-      message = apr_pvsprintf(pool, fmt, ap);
-      va_end(ap);
-    }
-  else
-    message = fmt;
+  va_start(ap, fmt);
+  message = apr_pvsprintf(pool, fmt, ap);
+  va_end(ap);
 
   return svn_stream_puts(stream, message);
 }



Mime
View raw message