Module Name:    src
Committed By:   riastradh
Date:           Sat Apr  4 00:01:28 UTC 2020

Modified Files:
        src/sys/dev/ic: vga_raster.c

Log Message:
Mark res __diagused; #ifdef DIAGNOSTIC panic ---> KASSERT.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/ic/vga_raster.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/ic/vga_raster.c
diff -u src/sys/dev/ic/vga_raster.c:1.46 src/sys/dev/ic/vga_raster.c:1.47
--- src/sys/dev/ic/vga_raster.c:1.46	Sun Dec  1 14:18:51 2019
+++ src/sys/dev/ic/vga_raster.c	Sat Apr  4 00:01:28 2020
@@ -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 @@ vga_raster_init_screen(struct vga_config
     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 @@ vga_raster_init_screen(struct vga_config
 	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);

Reply via email to