From 83f904226367c144f4304df6292991d34a6ad427 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Wed, 19 Dec 2018 16:03:50 -0500 Subject: [PATCH] printf: Convert dentry_name to printf_char Signed-off-by: Matthew Wilcox --- lib/vsprintf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index ceab03dd297f..700d48d5acf6 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -756,7 +756,7 @@ char *dentry_name(struct printf_state *ps, const struct dentry *d) } } s = array[--i]; - for (n = 0; n != ps->spec.precision; n++, ps->buf++) { + for (n = 0; n != ps->spec.precision; n++) { char c = *s++; if (!c) { if (!i) @@ -764,8 +764,7 @@ char *dentry_name(struct printf_state *ps, const struct dentry *d) c = '/'; s = array[--i]; } - if (ps->buf < ps->end) - *ps->buf = c; + printf_char(ps, c); } rcu_read_unlock(); printf_widen_string(ps, n); -- 2.50.1