Skip to content
Commit 276d6050 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Martin Schwidefsky
Browse files

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 5d2f6e26
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment