Module Name: src Committed By: hans Date: Sun Mar 23 12:09:05 UTC 2025
Modified Files: src/sys/dev/wscons: wskbd.c Log Message: wskbd(4): fix bogus DIAGNOSTIC checks Similar to uts(4) and ums(4), these checks should be done always, and the only thing DIAGNOSTIC about them should be the printing of the message. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/dev/wscons/wskbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wscons/wskbd.c diff -u src/sys/dev/wscons/wskbd.c:1.144 src/sys/dev/wscons/wskbd.c:1.145 --- src/sys/dev/wscons/wskbd.c:1.144 Sun Dec 27 16:09:33 2020 +++ src/sys/dev/wscons/wskbd.c Sun Mar 23 12:09:05 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.144 2020/12/27 16:09:33 tsutsui Exp $ */ +/* $NetBSD: wskbd.c,v 1.145 2025/03/23 12:09:05 hans Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.144 2020/12/27 16:09:33 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.145 2025/03/23 12:09:05 hans Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -737,12 +737,12 @@ wskbd_deliver_event(struct wskbd_softc * return; } -#ifdef DIAGNOSTIC if (evar->q == NULL) { +#ifdef DIAGNOSTIC printf("wskbd_input: evar->q=NULL\n"); +#endif return; } -#endif event.type = type; event.value = 0; @@ -958,12 +958,12 @@ wskbdread(dev_t dev, struct uio *uio, in if (sc->sc_dying) return (EIO); -#ifdef DIAGNOSTIC if (sc->sc_base.me_evp == NULL) { +#ifdef DIAGNOSTIC printf("wskbdread: evp == NULL\n"); +#endif return (EINVAL); } -#endif sc->sc_refcnt++; error = wsevent_read(sc->sc_base.me_evp, uio, flags);