[PATCH 03/19] cache.c: don't use statically sized buffers for filenames
John Keeping
john at keeping.me.uk
Sun Apr 7 13:30:35 CEST 2013
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 <john at keeping.me.uk> 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.
More information about the CGit
mailing list