Remove unnecessary va_end

va_end must be called before the function returns, but errx is noreturn.
weechat-hashes
Curtis McEnroe 2018-08-10 12:45:37 -04:00
parent 1a9ae050d6
commit b740e937df
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 1 additions and 4 deletions

View File

@ -58,10 +58,7 @@ static void shift(
va_list ap; va_list ap;
va_start(ap, opt); va_start(ap, opt);
for (size_t i = 0; i < req; ++i) { for (size_t i = 0; i < req; ++i) {
if (!params) { if (!params) errx(EX_PROTOCOL, "%zu params required, found %zu", req, i);
va_end(ap);
errx(EX_PROTOCOL, "%zu params required, found %zu", req, i);
}
field = paramField(&params); field = paramField(&params);
char **param = va_arg(ap, char **); char **param = va_arg(ap, char **);
if (param) *param = field; if (param) *param = field;