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 Convert some assignments into KASSERTs.



details:   https://anonhg.NetBSD.org/src/rev/1076c8a0a50e
branches:  trunk
changeset: 373737:1076c8a0a50e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Feb 25 08:41:37 2023 +0000

description:
Convert some assignments into KASSERTs.

l_md is zeroised by lwp_create with

         memset(&l2->l_startzero, 0, sizeof(*l2) -
                    offsetof(lwp_t, l_startzero));

diffstat:

 sys/arch/mips/mips/vm_machdep.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 7362b3e1aca8 -r 1076c8a0a50e sys/arch/mips/mips/vm_machdep.c
--- a/sys/arch/mips/mips/vm_machdep.c   Sat Feb 25 08:30:31 2023 +0000
+++ b/sys/arch/mips/mips/vm_machdep.c   Sat Feb 25 08:41:37 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.165 2022/09/29 07:00:46 skrll Exp $   */
+/*     $NetBSD: vm_machdep.c,v 1.166 2023/02/25 08:41:37 skrll Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.165 2022/09/29 07:00:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.166 2023/02/25 08:41:37 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_cputype.h"
@@ -93,9 +93,9 @@
 
        KASSERT(l1 == curlwp || l1 == &lwp0);
 
-       l2->l_md.md_ss_addr = 0;
-       l2->l_md.md_ss_instr = 0;
-       l2->l_md.md_astpending = 0;
+       KASSERT(l2->l_md.md_ss_addr == 0);
+       KASSERT(l2->l_md.md_ss_instr == 0);
+       KASSERT(l2->l_md.md_astpending == 0);
 
        /* Copy the PCB from parent. */
        *pcb2 = *pcb1;



Home | Main Index | Thread Index | Old Index