aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-11-12 18:11:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:35 -0500
commit01284764713b02be23e72338227ce536c740399a (patch)
tree39cd34cf7c859afb268786557bea1b327be5be5a /kernel/panic.c
parent1931d433d7a641e6a366854566ab1207a32972a6 (diff)
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 <gang.chen@asianux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c2
1 files changed, 1 insertions, 1 deletions
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[] = {
233 */ 233 */
234const char *print_tainted(void) 234const char *print_tainted(void)
235{ 235{
236 static char buf[ARRAY_SIZE(tnts) + sizeof("Tainted: ") + 1]; 236 static char buf[ARRAY_SIZE(tnts) + sizeof("Tainted: ")];
237 237
238 if (tainted_mask) { 238 if (tainted_mask) {
239 char *s; 239 char *s;