summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog2
-rw-r--r--runtime/vsprintf.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 930a1709..59de5332 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,5 +1,7 @@
2006-04-10 Martin Hunt <hunt@redhat.com>
+ * vsprintf.c (_stp_snprintf): New function.
+
* stat-common.c (_stp_stat_print_histogram): Write a
newline at the end of the histogram.
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 45e15ce5..04843758 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -386,4 +386,15 @@ int _stp_vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
return (i >= size) ? (size - 1) : i;
}
+int _stp_snprintf(char *buf, size_t size, const char *fmt, ...)
+{
+ va_list args;
+ int i;
+
+ va_start(args, fmt);
+ i=_stp_vsnprintf(buf,size,fmt,args);
+ va_end(args);
+ return i;
+}
+
#endif /* _VSPRINTF_C_ */