From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 7 Apr 2013 12:30:35 +0100 Subject: [PATCH 03/19] cache.c: don't use statically sized buffers for filenames In-Reply-To: References: <36d473c9ccb9f438f4feedc7b24496cde2712f57.1365326321.git.john@keeping.me.uk> Message-ID: <20130407113035.GW2222@serenity.lan> On Sun, Apr 07, 2013 at 01:11:55PM +0200, Jason A. Donenfeld wrote: > On Sun, Apr 7, 2013 at 11:29 AM, John Keeping wrote: > > + if (filename.buf[filename.len - 1] != '/') > > + strbuf_addch(&filename, '/'); > > > + if (fullname.buf[fullname.len - 1] != '/') > > + strbuf_addch(&fullname, '/'); > > > Seems like it might be handy to have an ensure_end for strbuf (and > perhaps eventually depreciate the char* ensure_end if that code is > refactored to use strbuf as well). Good idea. I'll work that into a reroll along with anything else that comes up.