From 319dd7e109dc9f6a3198d613d9c290c5c5055ce7 Mon Sep 17 00:00:00 2001 From: mikeller Date: Thu, 28 Feb 2019 20:23:04 +1300 Subject: [PATCH] Fixed 'cliPrintErrorLinef'. --- src/main/cli/cli.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index cd68ca507..7b1b9761d 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -391,22 +391,26 @@ static void cliPrintLinef(const char *format, ...) cliPrintLinefeed(); } -static void cliPrintError(const char *format, ...) +static void cliPrintErrorVa(const char *format, va_list va) { cliPrint("###ERROR: "); - va_list va; - va_start(va, format); cliPrintfva(format, va); va_end(va); cliPrint("###"); } +static void cliPrintError(const char *format, ...) +{ + va_list va; + va_start(va, format); + cliPrintErrorVa(format, va); +} + static void cliPrintErrorLinef(const char *format, ...) { va_list va; va_start(va, format); - cliPrintError(format, va); - va_end(va); + cliPrintErrorVa(format, va); cliPrintLinefeed(); }