mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
bootstrap: avoid a warning from OpenBSD linker
Avoid this link time warning by using strdup(): host/kernel/bootstrap.o(.text+0x854): In function `fopen_include': ../kernel/bootstrap.c:479: warning: strcpy() is almost always misused, please use strlcpy() Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@953 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -475,8 +475,7 @@ static FILE *fopen_include(const char *fil)
|
||||
#ifdef CONFIG_DEBUG_INTERPRETER
|
||||
printk("Including '%s'\n", name );
|
||||
#endif
|
||||
srcfilenames [ cursrc ] = malloc(strlen(fil) + 1);
|
||||
strcpy(srcfilenames[ cursrc ], fil);
|
||||
srcfilenames[cursrc] = strdup(fil);
|
||||
srclines [ cursrc ] = 1;
|
||||
srcfiles [ cursrc++ ] = ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user