mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Change the buffer size to what we actually need and use util_strlcpy() to correctly copy strings. This gets rid of the following GCC8 compile warnings: fcp.c: In function ‘fcp_wwpn_get’: fcp.c:44:2: warning: ‘strncpy’ output may be truncated copying 20 bytes from a string of length 4095 [-Wstringop-truncation] strncpy(wwpn, buf, 20); ^~~~~~~~~~~~~~~~~~~~~~ fcp.c: In function ‘fcp_lun_get’: fcp.c:65:2: warning: ‘strncpy’ output may be truncated copying 20 bytes from a string of length 4095 [-Wstringop-truncation] strncpy(lun, buf, 20); ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>