mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Copy strings correctly by using util_strlcpy() over strncpy() and get
rid of the following GCC8 compile warning:
In function ‘dinfo_extract_dev’,
inlined from ‘dinfo_get_dev_from_blockdev’ at dasdinfo.c:365:6:
dasdinfo.c:337:2: warning: ‘strncpy’ specified bound 80 equals
destination size [-Wstringop-trunc ation]
strncpy(tmp, str, RD_BUFFER_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>