Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Mark res __diagused; #ifdef DIAGNOSTIC panic --->...
details: https://anonhg.NetBSD.org/src/rev/83dbdd2cbc1f
branches: trunk
changeset: 1008808:83dbdd2cbc1f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Apr 04 00:01:28 2020 +0000
description:
Mark res __diagused; #ifdef DIAGNOSTIC panic ---> KASSERT.
diffstat:
sys/dev/ic/vga_raster.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 76b6ce7177e3 -r 83dbdd2cbc1f sys/dev/ic/vga_raster.c
--- a/sys/dev/ic/vga_raster.c Fri Apr 03 23:49:38 2020 +0000
+++ b/sys/dev/ic/vga_raster.c Sat Apr 04 00:01:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $ */
+/* $NetBSD: vga_raster.c,v 1.47 2020/04/04 00:01:28 riastradh Exp $ */
/*
* Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.47 2020/04/04 00:01:28 riastradh Exp $");
#include "opt_vga.h"
#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -440,7 +440,7 @@
const struct wsscreen_descr *type, int existing, long *attrp)
{
int cpos;
- int res;
+ int res __diagused;
struct vga_handle *vh;
scr->cfg = vc;
@@ -513,10 +513,7 @@
else
#endif
res = vga_raster_allocattr(scr, 0, 0, 0, attrp);
-#ifdef DIAGNOSTIC
- if (res)
- panic("vga_raster_init_screen: attribute botch");
-#endif
+ KASSERTMSG(res == 0, "attribute botch");
vc->nscreens++;
LIST_INSERT_HEAD(&vc->screens, scr, next);
Home |
Main Index |
Thread Index |
Old Index