diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-07-10 07:55:59 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-07-10 07:55:59 +0000 |
commit | 379d40b2a738813d63d71be2c2972ee651e35b73 (patch) | |
tree | b3a8e1b29dfc07504bfb5cebea017e39251bd00f /sys | |
parent | 20a7a072f285d64d16ffed591a1717c836adff40 (diff) | |
download | FreeBSD-src-379d40b2a738813d63d71be2c2972ee651e35b73.zip FreeBSD-src-379d40b2a738813d63d71be2c2972ee651e35b73.tar.gz |
Get rid of a couple of Coverity found sign comparison errors.
Approved by: re (Ken)
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 14a1d63..898e16d 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -414,7 +414,7 @@ ispioctl(_DEV dev, u_long c, caddr_t addr, int flags, _IOP *td) if (IS_SCSI(isp)) { break; } - if (ifc->loopid < 0 || ifc->loopid >= MAX_FC_TARG) { + if (ifc->loopid >= MAX_FC_TARG) { retval = EINVAL; break; } @@ -726,7 +726,7 @@ create_lun_state(ispsoftc_t *isp, int bus, tstate_t *tptr, *new; lun = xpt_path_lun_id(path); - if (lun < 0) { + if (lun >= ISP_MAX_LUNS(isp)) { return (CAM_LUN_INVALID); } if (is_lun_enabled(isp, bus, lun)) { @@ -823,7 +823,7 @@ isp_en_lun(ispsoftc_t *isp, union ccb *ccb) } if ((lun != CAM_LUN_WILDCARD) && - (lun < 0 || lun >= (lun_id_t) isp->isp_maxluns)) { + (lun >= (lun_id_t) isp->isp_maxluns)) { ccb->ccb_h.status = CAM_LUN_INVALID; return (-1); } |