linux/arch/s390/appldata
Vasily Gorbik f6ea4d25e9 s390: fix gcc 8 stringop-truncation warnings in proc handlers
arch/s390/kernel/topology.c:591:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
   strncpy(buf, topology_is_enabled() ? "1\n" : "0\n", ARRAY_SIZE(buf));

arch/s390/appldata/appldata_base.c:326:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
   strncpy(buf, ops->active ? "1\n" : "0\n", ARRAY_SIZE(buf));

arch/s390/appldata/appldata_base.c:217:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
   strncpy(buf, appldata_timer_active ? "1\n" : "0\n", ARRAY_SIZE(buf));

To avoid the warning, just reuse memcpy.

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>
2018-07-02 11:24:53 +02:00
..
Makefile s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
appldata.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
appldata_base.c s390: fix gcc 8 stringop-truncation warnings in proc handlers 2018-07-02 11:24:53 +02:00
appldata_mem.c s390: appldata: add SPDX identifiers to the remaining files 2017-11-24 15:37:18 +01:00
appldata_net_sum.c s390: appldata: add SPDX identifiers to the remaining files 2017-11-24 15:37:18 +01:00
appldata_os.c s390: appldata: add SPDX identifiers to the remaining files 2017-11-24 15:37:18 +01:00