error_prints: add missing va_end() calls

These missing va_end() calls are followed by die() calls that never
return, so the only practical effect of this change is appeasement
of code checking tools.

Reported by cppcheck.

* error_prints.c (error_msg_and_die, error_msg_and_help,
perror_msg_and_die): Add va_end().
This commit is contained in:
Eugene Syromyatnikov 2018-05-02 20:08:19 +02:00 committed by Dmitry V. Levin
parent 4eb79a767d
commit f08a679a1d

View File

@ -90,6 +90,7 @@ error_msg_and_die(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(0, fmt, p);
va_end(p);
die();
}
@ -100,6 +101,7 @@ error_msg_and_help(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(0, fmt, p);
va_end(p);
}
fprintf(stderr, "Try '%s -h' for more information.\n",
program_invocation_name);
@ -121,5 +123,6 @@ perror_msg_and_die(const char *fmt, ...)
va_list p;
va_start(p, fmt);
verror_msg(errno, fmt, p);
va_end(p);
die();
}