tests: Add missing va_end in cmd/command-t 04/14704/2
authorAndrew Deason <adeason@sinenomine.net>
Mon, 19 Jul 2021 01:55:57 +0000 (20:55 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 20 Jul 2021 01:29:33 +0000 (21:29 -0400)
Every va_start call is supposed to be paired with a matching va_end
call, but 'checkList' is missing any call to va_end. This doesn't
currently seem to cause any visible problems, but add the matching
va_end to avoid potential future issues.

Change-Id: I569618823f39f4da5b1787cc49c5509d8ea37528
Reviewed-on: https://gerrit.openafs.org/14704
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

tests/cmd/command-t.c

index 71efd39..7b285f9 100644 (file)
@@ -72,6 +72,7 @@ checkList(struct cmd_item *list, ...)
        list = list->next;
        el = va_arg(ap, char *);
     }
+    va_end(ap);
 
     if (el == NULL && list == NULL) {
        ok(1, "List has correct number of elements");