diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
commit | db7d4daea91e105e3859cf461d7e53b9b77454b2 (patch) | |
tree | 9bb65b95440af09e8aca63abe56970dd3360cc57 /lib/vsprintf.c | |
parent | 9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff) |
Merge with Linux 2.2.8.
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } - |