Make openssl_error() a bit more versatile. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- scripts/keytoc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/keytoc.c b/scripts/keytoc.c index 0883ca64f7..aa36ba02e1 100644 --- a/scripts/keytoc.c +++ b/scripts/keytoc.c @@ -25,11 +25,14 @@ static int dts, standalone; -static int openssl_error(const char *msg) +static int openssl_error(const char *fmt, ...) { + va_list va; unsigned long sslErr = ERR_get_error(); - fprintf(stderr, "%s", msg); + va_start(va, fmt); + vfprintf(stderr, fmt, va); + va_end(va); fprintf(stderr, ": %s\n", ERR_error_string(sslErr, 0)); -- 2.39.2