[PATCH 03/19] cache.c: don't use statically sized buffers for filenames

Jason A. Donenfeld Jason at zx2c4.com
Sun Apr 7 13:11:55 CEST 2013


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).




More information about the CGit mailing list