Do not test if pDCB is not NULL, we dereference it before anyway, and it

should not happen. Add a KASSERT instead.

Reported by:	Ted Unangst <tedu@coverity.com>
Spotted out by:	cperciva
This commit is contained in:
Olivier Houchard 2004-02-20 20:36:55 +00:00
parent b8b31f33b1
commit fdf2a3468a

View file

@ -1334,11 +1334,10 @@ void *vpACB;
if (scsi_intstatus & (INT_BUSSERVICE | INT_CMDDONE)) {
pDCB = pACB->pActiveDCB;
KASSERT(pDCB != NULL, ("no active DCB"));
pSRB = pDCB->pActiveSRB;
if (pDCB) {
if (pDCB->DCBFlag & ABORT_DEV_)
if (pDCB->DCBFlag & ABORT_DEV_)
trm_EnableMsgOutAbort1(pACB, pSRB);
}
phase = (u_int16_t) pSRB->ScsiPhase; /* phase: */
stateV = (void *) trm_SCSI_phase0[phase];
stateV(pACB, pSRB, &scsi_status);