summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorCurtis McEnroe2018-08-10 12:45:37 -0400
committerCurtis McEnroe2018-08-10 12:45:37 -0400
commitb740e937df159255e4a33375e9e3afd03dd5a49b (patch)
tree903d0848f947b211e0ef73e91d6f623fcc629544 /handle.c
parent1a9ae050d62dd56f285b59d3952f1dabe186ea9c (diff)
Remove unnecessary va_end
va_end must be called before the function returns, but errx is noreturn.
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c5
1 files changed, 1 insertions, 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(&params);
 		char **param = va_arg(ap, char **);
 		if (param) *param = field;