trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [1/2] git commit: Add full printf format string support to rprintf().
Date Wed, 30 Oct 2013 20:21:26 GMT
Updated Branches:
  refs/heads/master 086906ae3 -> 6ae6b3f49


Add full printf format string support to rprintf().


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ffc8428f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ffc8428f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ffc8428f

Branch: refs/heads/master
Commit: ffc8428f9755dd68eeb94eac8b819b5da9d17ef5
Parents: 086906a
Author: James Peach <jpeach@apache.org>
Authored: Mon Oct 28 21:08:51 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Wed Oct 30 13:20:04 2013 -0700

----------------------------------------------------------------------
 lib/ts/Regression.cc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ffc8428f/lib/ts/Regression.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Regression.cc b/lib/ts/Regression.cc
index d7f5918..39e7438 100644
--- a/lib/ts/Regression.cc
+++ b/lib/ts/Regression.cc
@@ -179,12 +179,15 @@ rprintf(RegressionTest *t, const char *format, ...)
 {
   int l;
   char buffer[8192];
-  char format2[8192];
-  snprintf(format2, sizeof(format2), "RPRINT %s: %s", t->name, format);
+
+  snprintf(buffer, sizeof(buffer), "RPRINT %s: ", t->name);
+  fputs(buffer, stderr);
+
   va_list ap;
   va_start(ap, format);
-  l = ink_bvsprintf(buffer, format2, ap);
+  l = vsnprintf(buffer, sizeof(buffer), format, ap);
   va_end(ap);
+
   fputs(buffer, stderr);
   return (l);
 }


Mime
View raw message