summaryrefslogtreecommitdiff
path: root/include/linux/string.h
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2018-09-11 10:44:03 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 18:47:31 +0100
commit6707b1ba53be158b5526e53c909d5a1ad61e8d8a (patch)
tree2edbead694e74360239ed79c71112c9715c13598 /include/linux/string.h
parent890bee6757298c23da3b1595361418e145986939 (diff)
misc: kgdbts: Fix restrict error
[ Upstream commit fa0218ef733e6f247a1a3986e3eb12460064ac77 ] kgdbts current fails when compiled with restrict: drivers/misc/kgdbts.c: In function ‘configure_kgdbts’: drivers/misc/kgdbts.c:1070:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict] strcpy(config, opt); ^~~~~~~~~~~~~~~~~~~ As the error says, config is being used in both the source and destination. Refactor the code to avoid the extra copy and put the parsing closer to the actual location. Signed-off-by: Laura Abbott <labbott@redhat.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/string.h')
0 files changed, 0 insertions, 0 deletions