git: a9504d76ccda - main - ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Dec 2023 09:09:49 UTC
The branch main has been updated by ram: URL: https://cgit.FreeBSD.org/src/commit/?id=a9504d76ccdad240b7d5761f4208e252f57042dd commit a9504d76ccdad240b7d5761f4208e252f57042dd Author: Ram Kishore Vegesna <ram@FreeBSD.org> AuthorDate: 2023-12-13 07:56:40 +0000 Commit: Ram Kishore Vegesna <ram@FreeBSD.org> CommitDate: 2023-12-18 08:52:06 +0000 ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf. Reported by: imp MFC after: 1 week --- sys/dev/ocs_fc/ocs_cam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c index 0fa94083e898..a944c7628d85 100644 --- a/sys/dev/ocs_fc/ocs_cam.c +++ b/sys/dev/ocs_fc/ocs_cam.c @@ -1540,15 +1540,13 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io, } } else if (scsi_status != OCS_SCSI_STATUS_GOOD) { const char *err_desc = NULL; - char path_str[64]; char err_str[224]; struct sbuf sb; size_t i; sbuf_new(&sb, err_str, sizeof(err_str), 0); - xpt_path_string(ccb->ccb_h.path, path_str, sizeof(path_str)); - sbuf_cat(&sb, path_str); + xpt_path_sbuf(ccb->ccb_h.path, &sb); for (i = 0; i < (sizeof(ocs_status_desc) / sizeof(ocs_status_desc[0])); i++) {