John Keeping <[email protected]> on Thu, 2014/11/27 09:05: > On Thu, Nov 27, 2014 at 01:30:56AM +0100, Christian Hesse wrote: > > Update to git version v2.2.0, including API changes. > > --- > [...] > > diff --git a/ui-repolist.c b/ui-repolist.c > > index c2bcce1..0e57c53 100644 > > --- a/ui-repolist.c > > +++ b/ui-repolist.c > > @@ -17,16 +17,18 @@ static time_t read_agefile(char *path) > > time_t result; > > size_t size; > > char *buf; > > - static char buf2[64]; > > + struct strbuf date_buf = STRBUF_INIT; > > > > if (readfile(path, &buf, &size)) > > return -1; > > > > - if (parse_date(buf, buf2, sizeof(buf2)) > 0) > > - result = strtoul(buf2, NULL, 10); > > + strbuf_reset(&date_buf); > > Why is this necessary? date_buf hasn't been used since it was > initialized.
Good point. Probably it is not necessary. ;)
I will reply with an updated patch.
> > + if (parse_date(buf, &date_buf) == 0)
> > + result = strtoul(date_buf.buf, NULL, 10);
> > else
> > result = 0;
> > free(buf);
> > + strbuf_release(&date_buf);
> > return result;
> > }
> >
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
pgpgo5xF137D1.pgp
Description: OpenPGP digital signature
_______________________________________________ CGit mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/cgit
