s390/tape: fix gcc 8 stringop-truncation warning
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 28 Jun 2018 11:28:37 +0000 (13:28 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 2 Jul 2018 09:25:03 +0000 (11:25 +0200)
commit276d605081fbbc96be02318abb36119625b47bb3
treec40d43e8ad1a74cf50d5e7c19715721848d158f1
parent5d2f6e26b318a41e4e588bb270377da13b78b3c8
s390/tape: fix gcc 8 stringop-truncation warning

Replace strncpy which is used to deliberately avoid string NUL-termination
with memcpy. This allows to get rid of gcc 8 stringop-truncation warning:

    inlined from 'ext_to_int_kekl' at drivers/s390/char/tape_3590.c:123:2:
./include/linux/string.h:246:9: warning: '__builtin_strncpy'
output may be truncated copying 64 bytes from a string of length 64
[-Wstringop-truncation]

Also replaces "for" loop on memset.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/tape_3590.c