dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: kugel: r30039 - trunk/firmware/common

Re: kugel: r30039 - trunk/firmware/common

From: Thomas Martitz <>
Date: Tue, 21 Jun 2011 00:21:27 +0200

Am 20.06.2011 23:30, schrieb Magnus Holmgren:
> On 2011-06-20 22:12, wrote:
>> Optimize new dircache_copy_path so that the helper (strlcat) doesn't
>> need to
>> walk through the entire string repeatedly.
> Is it really a performance problem? Avoiding this kind of
> pointer/buffer size juggling is one of the reasons for using
> strlcpy/strlcat.

I had this before, but the optimization was kind of requested by pamaury
:) I don't feel strong either way.

>> Also fix a off-by-one.
> Not really, as strlcpy/strlcat takes the full size of the buffer as
> argument. Unless it is needed because of the offset juggling? :)

Hm, the -1 was to account for the first "buf[0] = '/';" (before entering
the helper function). But it seems now wrong as the buffer including
this first slash is passed (and the helper accounts for the first slash
as well).

Best regards.
Received on 2011-06-21

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy