mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
t-strvec: use va_end() to match va_start()
Our check_strvec_loc() helper uses a variable argument list. When we va_start(), we must be sure to va_end() before leaving the function. This is required by the standard (though the effect of forgetting will vary between platforms). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a3f0e2a064
commit
b639884f9a
|
@ -22,11 +22,13 @@ static void check_strvec_loc(const char *loc, struct strvec *vec, ...)
|
|||
strbuf_addf(&msg, "strvec index %"PRIuMAX, (uintmax_t) nr);
|
||||
test_assert(loc, msg.buf, 0);
|
||||
strbuf_release(&msg);
|
||||
va_end(ap);
|
||||
return;
|
||||
}
|
||||
|
||||
nr++;
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
check_uint(vec->nr, ==, nr);
|
||||
check_uint(vec->alloc, >=, nr);
|
||||
|
|
Loading…
Reference in a new issue