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:
Blue Swirl
2010-11-13 10:56:45 +00:00
parent 07c440b33b
commit 8a01c240b8

View File

@@ -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;