[OpenBIOS] [commit] r953 - trunk/openbios-devel/kernel

Andreas Färber andreas.faerber at web.de
Sat Nov 13 12:06:02 CET 2010


Am 13.11.2010 um 11:56 schrieb repository service:

> 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 at 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);

Indentation.



More information about the OpenBIOS mailing list