aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaolei <[email protected]>2009-03-27 17:09:10 +0800
committerIngo Molnar <[email protected]>2009-04-08 17:03:44 +0200
commit022624a758dc9489388a99ad29577b4c8c09237c (patch)
treeb434af52b1a326fdbb96c0af9f41f012bab48acb
parentff96e612cba32510e263e17b213235fe5746397e (diff)
printk: fix wrong format string iter for printk
printk("%Q"); Output before patch: %QQ Output after patch: %Q Signed-off-by: Zhao Lei <[email protected]> Acked-by: Lai Jiangshan <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Cc: [email protected] Cc: Steven Rostedt <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--lib/vsprintf.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index be3001f912e4..7536acea135b 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1339,8 +1332,6 @@ do { \
break;
case FORMAT_TYPE_INVALID:
- if (!*fmt)
- --fmt;
break;
case FORMAT_TYPE_NRCHARS: {
@@ -1523,13 +1514,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
if (str < end)
*str = '%';
++str;
- if (*fmt) {
- if (str < end)
- *str = *fmt;
- ++str;
- } else {
- --fmt;
- }
break;
case FORMAT_TYPE_NRCHARS: