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

Andreas Färber andreas.faerber at web.de
Sat Nov 13 13:56:11 CET 2010


Am 13.11.2010 um 12:16 schrieb Blue Swirl:

> On Sat, Nov 13, 2010 at 11:06 AM, Andreas Färber <andreas.faerber at web.de 
> > wrote:
>> 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.
>
> Unchanged.

Tabs were replaced by spaces. We should really think about a migration  
strategy.
I would've said auto-convert all files if Mark and I didn't have  
patches that would break then... (and ppc files shouldn't be auto- 
converted due to 4 vs. 8 issues that get harder to figure out then)

Andreas


More information about the OpenBIOS mailing list