target is unsigned, so don't compare it < 0 for range test.

This commit is contained in:
Warner Losh 2014-08-07 21:56:32 +00:00
parent 51fa06dd19
commit 8baa44e571
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269690

View File

@ -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;
}