From b740e937df159255e4a33375e9e3afd03dd5a49b Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 10 Aug 2018 12:45:37 -0400 Subject: Remove unnecessary va_end va_end must be called before the function returns, but errx is noreturn. --- handle.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/handle.c b/handle.c index 81a38f7..be41828 100644 --- a/handle.c +++ b/handle.c @@ -58,10 +58,7 @@ static void shift( va_list ap; va_start(ap, opt); for (size_t i = 0; i < req; ++i) { - if (!params) { - va_end(ap); - errx(EX_PROTOCOL, "%zu params required, found %zu", req, i); - } + if (!params) errx(EX_PROTOCOL, "%zu params required, found %zu", req, i); field = paramField(¶ms); char **param = va_arg(ap, char **); if (param) *param = field; -- cgit 1.4.1-2-gfad0