From 7245e75f11074fbb221987cf32f0c999bbbafa5a Mon Sep 17 00:00:00 2001 From: Yury Norov Date: Tue, 24 Aug 2021 09:59:59 +1000 Subject: [PATCH] lib/vsprintf: don't increment buf in bitmap_list_string Increment is confusing as the buf is overritten at the same line. Link: https://lkml.kernel.org/r/20210817193735.269942-1-yury.norov@gmail.com Fixes: b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817) Signed-off-by: Yury Norov Suggested-by: Andy Shevchenko Cc: Wolfram Sang Cc: Alexander Lobakin Cc: Alexey Klimov Cc: Dennis Zhou Cc: Jiri Olsa Cc: Ulf Hansson Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index cd9f359c5bf9..9046c7720d96 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1261,7 +1261,7 @@ char *bitmap_list_string(char *buf, char *end, unsigned long *bitmap, if (buf < end) *buf = '-'; - buf = number(++buf, end, rtop - 1, default_dec_spec); + buf = number(buf + 1, end, rtop - 1, default_dec_spec); } return buf; } -- 2.50.1