Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/fpu fpu_dumpfpn(): Add KASSERT to check arg...



details:   https://anonhg.NetBSD.org/src/rev/010aea3fba05
branches:  trunk
changeset: 935181:010aea3fba05
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Jun 27 04:31:06 2020 +0000

description:
fpu_dumpfpn(): Add KASSERT to check argument != NULL.

diffstat:

 sys/arch/powerpc/fpu/fpu_emu.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 38d5adeb8d09 -r 010aea3fba05 sys/arch/powerpc/fpu/fpu_emu.c
--- a/sys/arch/powerpc/fpu/fpu_emu.c    Sat Jun 27 04:29:27 2020 +0000
+++ b/sys/arch/powerpc/fpu/fpu_emu.c    Sat Jun 27 04:31:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_emu.c,v 1.21 2020/06/27 04:18:57 rin Exp $ */
+/*     $NetBSD: fpu_emu.c,v 1.22 2020/06/27 04:31:06 rin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.21 2020/06/27 04:18:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.22 2020/06/27 04:31:06 rin Exp $");
 
 #include "opt_ddb.h"
 
@@ -163,6 +163,8 @@
                "SNAN", "QNAN", "ZERO", "NUM", "INF"
        };
 
+       KASSERT(fp != NULL);
+
        printf("%s %c.%x %x %x %xE%d\n", class[fp->fp_class + 2],
                fp->fp_sign ? '-' : ' ',
                fp->fp_mant[0], fp->fp_mant[1],



Home | Main Index | Thread Index | Old Index