Erik Faye-Lund <kusmabite@xxxxxxxxxxxxxx> writes: > +void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap) > { > int len; > > if (!strbuf_avail(sb)) > strbuf_grow(sb, 64); > len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); > if (len < 0) > die("your vsnprintf is broken"); > if (len > strbuf_avail(sb)) { > strbuf_grow(sb, len); > len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); > if (len > strbuf_avail(sb)) { > die("this should not happen, your snprintf is broken"); > } Hmm, I would have expected to see va_copy() somewhere in the patch text. Is it safe to reuse ap like this in two separate invocations of vsnprintf()? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html