You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/11/03 04:39:44 UTC
[05/41] git commit: Add full printf format string support to
rprintf().
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/5.0.x
Commit: ffc8428f9755dd68eeb94eac8b819b5da9d17ef5
Parents: 086906a
Author: James Peach <jp...@apache.org>
Authored: Mon Oct 28 21:08:51 2013 -0700
Committer: James Peach <jp...@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);
}