Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Include room for the trailing NUL in the ...



details:   https://anonhg.NetBSD.org/src/rev/a22624de7268
branches:  trunk
changeset: 972956:a22624de7268
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Jun 14 14:40:24 2020 +0000

description:
Include room for the trailing NUL in the way name string.

diffstat:

 sys/arch/mips/mips/mips_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r bf498d1ecedf -r a22624de7268 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Sun Jun 14 14:26:17 2020 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Sun Jun 14 14:40:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.288 2020/06/14 06:50:31 simonb Exp $        */
+/*     $NetBSD: mips_machdep.c,v 1.289 2020/06/14 14:40:24 simonb Exp $        */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.288 2020/06/14 06:50:31 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.289 2020/06/14 14:40:24 simonb Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -1444,7 +1444,7 @@
 static const char *
 wayname(int ways)
 {
-       static char buf[sizeof("xxx-way set-associative")];
+       static char buf[sizeof("xxx-way set-associative") + 1];
 
 #ifdef DIAGNOSTIC
        if (ways > 999)



Home | Main Index | Thread Index | Old Index