From db7d4daea91e105e3859cf461d7e53b9b77454b2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 13 Jun 1999 16:29:25 +0000 Subject: Merge with Linux 2.2.8. --- lib/vsprintf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/vsprintf.c') diff --git a/lib/vsprintf.c b/lib/vsprintf.c index b42b01b11..48959e3a8 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -261,6 +261,10 @@ int vsprintf(char *buf, const char *fmt, va_list args) } continue; + case '%': + *str++ = '%'; + continue; + /* integer number formats - set up the flags and "break" */ case 'o': base = 8; @@ -279,8 +283,7 @@ int vsprintf(char *buf, const char *fmt, va_list args) break; default: - if (*fmt != '%') - *str++ = '%'; + *str++ = '%'; if (*fmt) *str++ = *fmt; else @@ -313,4 +316,3 @@ int sprintf(char * buf, const char *fmt, ...) va_end(args); return i; } - -- cgit v1.2.3