summaryrefslogtreecommitdiffstats
path: root/runtime/vsprintf.c
diff options
context:
space:
mode:
authorguanglei <guanglei>2006-05-09 06:19:29 +0000
committerguanglei <guanglei>2006-05-09 06:19:29 +0000
commit1533faf160b1456dd03865f117773abb823adc7a (patch)
treec478165c832e7e898ea150e2657ad16d953e0831 /runtime/vsprintf.c
parentcea8bf5af1a62458bfda18265a526bdef2df824b (diff)
downloadsystemtap-steved-1533faf160b1456dd03865f117773abb823adc7a.tar.gz
systemtap-steved-1533faf160b1456dd03865f117773abb823adc7a.tar.xz
systemtap-steved-1533faf160b1456dd03865f117773abb823adc7a.zip
%0s support to print null-terminated string
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r--runtime/vsprintf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 44e431fb..ba0bc85a 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -275,6 +275,11 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
*str = ' ';
++str;
}
+ if(flags & STP_ZEROPAD) {
+ if (str <= end)
+ *str = '\0';
+ ++str;
+ }
continue;
case 'X':