On Tue, Jun 04, 2013 at 12:34:49PM +0200, Jason A. Donenfeld wrote:
> Here is the function in question:
> 
> [...]
> 
> I'll adjust it to this:
> 
> static int read_config_line(FILE *f, char *line, const char **value,
> int bufsize)
> {
> [...]
>                 } else if (c == '\n' || c == EOF) {
>                         break;
>                 } else {
>                         line[i] = c;
>                 }
>                 isname = 1;
>                 i++;
>         }
>         line[i] = 0;
>         return i;
> }
> 
> Look good?

Ack. Maybe we can further improve this by using strbuf_*() instead of
fixed-size buffers?

> 
> Thanks Kent.
> _______________________________________________
> CGit mailing list
> [email protected]
> http://lists.zx2c4.com/mailman/listinfo/cgit
_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to