diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-31 08:55:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-31 08:55:34 -0700 |
| commit | 94d25d3254847fdbf6faf49f145368ec1c3b1ee9 (patch) | |
| tree | 72837aa27b50c7a1457b59d0e2ae64e89686e40c /t/unit-tests/t-strvec.c | |
| parent | a3f0e2a06496c8547b27921445ab47f482452a69 (diff) | |
| parent | 64f8502b40affcb4c956c511fef7e704a88b0e25 (diff) | |
| download | git-94d25d3254847fdbf6faf49f145368ec1c3b1ee9.tar.gz | |
Merge branch 'jk/leakfixes' into jk/sparse-leakfix
* jk/leakfixes:
mv: replace src_dir with a strvec
mv: factor out empty src_dir removal
mv: move src_dir cleanup to end of cmd_mv()
t-strvec: mark variable-arg helper with LAST_ARG_MUST_BE_NULL
t-strvec: use va_end() to match va_start()
Diffstat (limited to 't/unit-tests/t-strvec.c')
| -rw-r--r-- | t/unit-tests/t-strvec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/unit-tests/t-strvec.c b/t/unit-tests/t-strvec.c index f17fb10d9e..d4615ab06d 100644 --- a/t/unit-tests/t-strvec.c +++ b/t/unit-tests/t-strvec.c @@ -4,6 +4,7 @@ #define check_strvec(vec, ...) \ check_strvec_loc(TEST_LOCATION(), vec, __VA_ARGS__) +LAST_ARG_MUST_BE_NULL static void check_strvec_loc(const char *loc, struct strvec *vec, ...) { va_list ap; @@ -22,11 +23,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); |
