[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210817193735.269942-1-yury.norov@gmail.com>
Date: Tue, 17 Aug 2021 12:37:35 -0700
From: Yury Norov <yury.norov@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Cc: Yury Norov <yury.norov@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Petr Mladek <pmladek@...e.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Steven Rostedt <rostedt@...dmis.org>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH] lib/vsprintf: don't increment buf in bitmap_list_string
Increment is confusing as the buf is overritten at the same line.
Fixes: b1c4af4d3d6b (vsprintf: rework bitmap_list_string) (next-20210817)
Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Yury Norov <yury.norov@...il.com>
---
lib/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 29a384eee286..919b70d00855 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.30.2
Powered by blists - more mailing lists