Skip to content

Commit

Permalink
printk: fix wrong format string iter for printk
Browse files Browse the repository at this point in the history
printk("%Q");

 Output before patch:  %QQ
 Output  after patch:  %Q

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: torvalds@linux-foundation.org
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <49CC97B6.7040809@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Zhaolei authored and Ingo Molnar committed Apr 8, 2009
1 parent ff96e61 commit 022624a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/vsprintf.c
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 022624a

Please sign in to comment.