|
Rockbox mail archiveSubject: Re: kugel: r30039 - trunk/firmware/commonRe: 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 > 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 |