t-strvec: mark variable-arg helper with LAST_ARG_MUST_BE_NULL
commit34eb843721bb3cd54e5fd1689d8f62bbba619bd9
authorJeff King <peff@peff.net>
Thu, 30 May 2024 06:39:56 +0000 (30 02:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 May 2024 15:55:29 +0000 (30 08:55 -0700)
tree086a79743d467f951b97e92ec571d0402090a342
parentb639884f9ac78325b9a6658f23c9c245b8ac8263
t-strvec: mark variable-arg helper with LAST_ARG_MUST_BE_NULL

This will let the compiler catch a problem like:

  /* oops, we forgot the NULL */
  check_strvec(&vec, "foo");

rather than triggering undefined behavior at runtime.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/unit-tests/t-strvec.c