t;)) {
> > + /*
> > +* Check if strbuf_grow(0) allocate a new NUL-terminated buffer
> > +*/
> > + strbuf_init(&sb, 0);
> > + strbuf_grow(&sb, 0);
> > + if (sb.buf == strbuf_slopbuf)
&g
+ /*
> > +* size_t overflow: should die()
> > +*/
> > + strbuf_init(&sb, 1000);
> > + strbuf_grow(&sb, maximum_unsigned_value_of_type((size_t)1));
>
> A comment "If this does not die(), fall through to returning success, to
> indicate an error" might be nice here.
Agreed.
> > + } else {
> > + usage("test-strbuf mode");
> > + }
> > +
> > + return 0;
> > +}
> > diff --git a/t/t0082-strbuf.sh b/t/t0082-strbuf.sh
> > new file mode 100755
> > index 000..0800d26
> > --- /dev/null
> > +++ b/t/t0082-strbuf.sh
> > @@ -0,0 +1,19 @@
> > +#!/bin/sh
> > +
> > +test_description="Test the strbuf API.
> > +"
>
> This description does not need a new-line, and existing one-liner test
> descriptions seem not to be terminated by a period.
OK.
> The rest of this patch looks good.
>
> Ciao,
> Johannes
>
Thanks for the Review,
Simon Rabourg
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2 matches
Mail list logo