summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2013-04-20 14:33:55 +0000
committerken <ken@FreeBSD.org>2013-04-20 14:33:55 +0000
commit125013a8784018597f6f937283665372e2c36af9 (patch)
tree8a871b43f4124e2a363415a6c9b96ef033b8b26f /sys/cam
parent53649a9504c0ce71dc947f113312786ad27d16e9 (diff)
downloadFreeBSD-src-125013a8784018597f6f937283665372e2c36af9.zip
FreeBSD-src-125013a8784018597f6f937283665372e2c36af9.tar.gz
Fix compilation.
Pointy hat to: ken
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_ch.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index 03dd5cd..a1d0db5 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -1147,15 +1147,11 @@ copy_element_status(struct ch_softc *softc,
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) {
OpenPOWER on IntegriCloud