Author: blueswirl Date: Sat Nov 13 11:56:45 2010 New Revision: 953 URL: http://tracker.coreboot.org/trac/openbios/changeset/953
Log: 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
Modified: trunk/openbios-devel/kernel/bootstrap.c
Modified: trunk/openbios-devel/kernel/bootstrap.c ============================================================================== --- trunk/openbios-devel/kernel/bootstrap.c Wed Nov 10 23:35:39 2010 (r952) +++ trunk/openbios-devel/kernel/bootstrap.c Sat Nov 13 11:56:45 2010 (r953) @@ -475,8 +475,7 @@ #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;