Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 21:56:32 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269690 - head/sys/dev/esp
Message-ID:  <53e3f610.2904.4c46763e@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Aug  7 21:56:32 2014
New Revision: 269690
URL: http://svnweb.freebsd.org/changeset/base/269690

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

Modified:
  head/sys/dev/esp/ncr53c9x.c

Modified: head/sys/dev/esp/ncr53c9x.c
==============================================================================
--- head/sys/dev/esp/ncr53c9x.c	Thu Aug  7 21:37:31 2014	(r269689)
+++ head/sys/dev/esp/ncr53c9x.c	Thu Aug  7 21:56:32 2014	(r269690)
@@ -1082,8 +1082,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e3f610.2904.4c46763e>