From: Chen Gang Date: Tue, 5 Nov 2013 05:57:44 +0000 (+1100) Subject: kernel/panic.c: reduce 1 byte usage for print tainted buffer X-Git-Tag: next-20131105~2^2~16 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74b173e3ba19fb4682646fbc18ff0d5a88b129cd;p=karo-tx-linux.git kernel/panic.c: reduce 1 byte usage for print tainted buffer sizeof("Tainted: ") already counts '\0', and after first sprintf(), 's' will start from the current string end (its' value is '\0'). So need not add additional 1 byte for maximized usage of 'buf' in print_tainted(). Signed-off-by: Chen Gang Signed-off-by: Andrew Morton --- diff --git a/kernel/panic.c b/kernel/panic.c index b6c482ccc5db..c00b4ceb39e8 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -233,7 +233,7 @@ static const struct tnt tnts[] = { */ const char *print_tainted(void) { - static char buf[ARRAY_SIZE(tnts) + sizeof("Tainted: ") + 1]; + static char buf[ARRAY_SIZE(tnts) + sizeof("Tainted: ")]; if (tainted_mask) { char *s;