svn commit: r249701 - head/sys/cam/scsi

Kenneth D. Merry ken at FreeBSD.org
Sat Apr 20 14:33:56 UTC 2013


Author: ken
Date: Sat Apr 20 14:33:55 2013
New Revision: 249701
URL: http://svnweb.freebsd.org/changeset/base/249701

Log:
  Fix compilation.
  
  Pointy hat to:	ken

Modified:
  head/sys/cam/scsi/scsi_ch.c

Modified: head/sys/cam/scsi/scsi_ch.c
==============================================================================
--- head/sys/cam/scsi/scsi_ch.c	Sat Apr 20 14:01:22 2013	(r249700)
+++ head/sys/cam/scsi/scsi_ch.c	Sat Apr 20 14:33:55 2013	(r249701)
@@ -1147,15 +1147,11 @@ copy_element_status(struct ch_softc *sof
 			ces->ces_designator_length = devid->designator_length;
 			/*
 			 * Make sure we are always NUL terminated.  The
-			 * buffer should be sized for the maximum
-			 * designator length plus 1, but this will make sure
-			 * there is always a NUL at the end.  This won't
-			 * matter for the binary code set, since the user
-			 * will only pay attention to the length field.
+			 * This won't matter for the binary code set,
+			 * since the user will only pay attention to the
+			 * length field.
 			 */
-			ces->ces_designator[
-			    MIN(sizeof(ces->ces_designator) - 1,
-			    devid->designator_length)]= '\0';
+			ces->ces_designator[devid->designator_length]= '\0';
 		}
 		if (devid->piv_assoc_designator_type &
 		    READ_ELEMENT_STATUS_PIV_SET) {


More information about the svn-src-head mailing list