scsi: lpfc: Replace outdated strncpy() with strscpy()
authorJustin Tee <justin.tee@broadcom.com>
Mon, 9 Jan 2023 23:33:07 +0000 (15:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Jan 2023 05:03:14 +0000 (00:03 -0500)
commit1f7b5f94f8d0c97f9b6d10e5ba47e15459ff74ff
treefb5ab07680de0028bd914e2b0101fb944fd75364
parent6058304a66baae4470188337700392d6404079b3
scsi: lpfc: Replace outdated strncpy() with strscpy()

The kernel test robot pointed out non-NULL terminated string possibilities
when using strncpy() in lpfc_xcvr_data_show() routine.  Although we
manually set the NULL character after strncpy(), strncpy() usage is
outdated.

Replace all strncpy() usages with the preferred strscpy() API.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c