summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-10 12:45:37 -0400
committerJune McEnroe <june@causal.agency>2018-08-10 12:45:37 -0400
commitb740e937df159255e4a33375e9e3afd03dd5a49b (patch)
tree903d0848f947b211e0ef73e91d6f623fcc629544
parentRename chan to join (diff)
downloadcatgirl-b740e937df159255e4a33375e9e3afd03dd5a49b.tar.gz
catgirl-b740e937df159255e4a33375e9e3afd03dd5a49b.zip
Remove unnecessary va_end
va_end must be called before the function returns, but errx is noreturn.
Diffstat (limited to '')
-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;