target is unsigned, so don't compare it < 0 for range test.
This commit is contained in:
parent
51fa06dd19
commit
8baa44e571
@ -1082,8 +1082,7 @@ ncr53c9x_action(struct cam_sim *sim, union ccb *ccb)
|
||||
|
||||
case XPT_RESET_DEV:
|
||||
case XPT_SCSI_IO:
|
||||
if (ccb->ccb_h.target_id < 0 ||
|
||||
ccb->ccb_h.target_id >= sc->sc_ntarg) {
|
||||
if (ccb->ccb_h.target_id >= sc->sc_ntarg) {
|
||||
ccb->ccb_h.status = CAM_PATH_INVALID;
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user