Source-Changes-HG archive

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

[.joined/src/trunk]: .joined/src/sys/dev/wscons Protect KASSERT() with "#ifde...



details:   https://anonhg.NetBSD.org/.joined/src/rev/cddb3a03239a
branches:  trunk
changeset: 359376:cddb3a03239a
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sat Jan 01 11:57:44 2022 +0000

description:
Protect KASSERT() with "#ifdef DIAGNOSTIC" as its expression is
undefined otherwise.

diffstat:

 sys/dev/wscons/wsemul_sun.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r db1e1b6495c3 -r cddb3a03239a sys/dev/wscons/wsemul_sun.c
--- a/sys/dev/wscons/wsemul_sun.c       Sat Jan 01 11:56:15 2022 +0000
+++ b/sys/dev/wscons/wsemul_sun.c       Sat Jan 01 11:57:44 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_sun.c,v 1.33 2018/09/03 16:29:34 riastradh Exp $ */
+/* $NetBSD: wsemul_sun.c,v 1.34 2022/01/01 11:57:44 hannken Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -33,7 +33,7 @@
 /* XXX DESCRIPTION/SOURCE OF INFORMATION */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.33 2018/09/03 16:29:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.34 2022/01/01 11:57:44 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -176,7 +176,9 @@
 
        if (console) {
                edp = &wsemul_sun_console_emuldata;
+#ifdef DIAGNOSTIC
                KASSERT(edp->console == 1);
+#endif
        } else {
                edp = malloc(sizeof *edp, M_DEVBUF, M_WAITOK);
 



Home | Main Index | Thread Index | Old Index