Mark res __diagused; #ifdef DIAGNOSTIC panic ---> KASSERT.
This commit is contained in:
parent
861fd004f0
commit
d10b865ffb
|
@ -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 *vc, struct vgascreen *scr,
|
|||
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 *vc, struct vgascreen *scr,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue