image: Correct strncpy() warning with image_set_name() 52/297452/2
authorSimon Glass <sjg@chromium.org>
Thu, 10 Nov 2022 02:14:39 +0000 (19:14 -0700)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 21 Aug 2023 04:38:24 +0000 (04:38 +0000)
commita001021645ee5172ae3dcc8d49c64f72077bf4b5
tree0a634fcd31fbdb58549702e99f4ac5b94615c201
parent6ec366f5e79068232eb6a99a2e0b675ee617e972
image: Correct strncpy() warning with image_set_name()

gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code
a different way to do the same thing, to avoid the warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
[sw0312.kim: cherry-pick upstream commit 88ff7cb1c8bb4 to remove gcc-13 build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Idda3d015e81fd39d33de1cfc13cc19f78404a5a1
include/image.h