Rockbox mail archiveSubject: Re: kugel: r30039 - trunk/firmware/common
Re: kugel: r30039 - trunk/firmware/common
From: Thomas Martitz <kugel_at_rockbox.org>
Date: Tue, 21 Jun 2011 00:21:27 +0200
Am 20.06.2011 23:30, schrieb Magnus Holmgren:
> On 2011-06-20 22:12, mailer_at_svn.rockbox.org 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
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 = '/';" (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
Received on 2011-06-21