Module Name:    src
Committed By:   maya
Date:           Mon Jun 20 20:19:43 UTC 2016

Modified Files:
        src/sys/arch/pmax/ibus: sii.c

Log Message:
Fix DEBUG build
While here, if DIAGNOSTIC panic to KASSERTMSG.

ok mlelstv@


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/ibus/sii.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/arch/pmax/ibus/sii.c
diff -u src/sys/arch/pmax/ibus/sii.c:1.11 src/sys/arch/pmax/ibus/sii.c:1.12
--- src/sys/arch/pmax/ibus/sii.c:1.11	Sun Nov 10 20:09:52 2013
+++ src/sys/arch/pmax/ibus/sii.c	Mon Jun 20 20:19:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $	*/
+/*	$NetBSD: sii.c,v 1.12 2016/06/20 20:19:43 maya Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.12 2016/06/20 20:19:43 maya Exp $");
 
 #include "sii.h"
 /*
@@ -1759,11 +1759,8 @@ sii_CmdDone(struct siisoftc *sc, int tar
 {
 	int i;
 
-#ifdef DIAGNOSTIC
-	ScsiCmd *scsicmd = sc->sc_cmd[target];
-	if (target < 0 || !scsicmd)
-		panic("sii_CmdDone");
-#endif
+	ScsiCmd *scsicmd __unused = sc->sc_cmd[target];
+	KASSERTMSG(target >= 0 && scsicmd, "sii_CmdDone");
 	sc->sc_cmd[target] = (ScsiCmd *)0;
 #ifdef DEBUG
 	if (sii_debug > 1) {

Reply via email to