Date: Sat, 20 Apr 2013 14:33:55 +0000 (UTC) From: "Kenneth D. Merry" <ken@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249701 - head/sys/cam/scsi Message-ID: <201304201433.r3KEXufn041937@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304201433.r3KEXufn041937>