From: Martin Mares Date: Mon, 31 May 2004 18:08:50 +0000 (+0000) Subject: Small correction to va_start/va_end in cli_printf (va_end was missing). X-Git-Tag: v1.2.0~391 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=277a34eff195fe39a63db59731f5f2c8d54abdb2;p=thirdparty%2Fbird.git Small correction to va_start/va_end in cli_printf (va_end was missing). (Andreas) --- diff --git a/nest/cli.c b/nest/cli.c index e3f9ccf9b..bd487d873 100644 --- a/nest/cli.c +++ b/nest/cli.c @@ -110,7 +110,6 @@ cli_printf(cli *c, int code, char *msg, ...) int cd = code; int size, cnt; - va_start(args, msg); if (cd < 0) { cd = -cd; @@ -122,7 +121,9 @@ cli_printf(cli *c, int code, char *msg, ...) else size = bsprintf(buf, "%04d ", cd); c->last_reply = cd; + va_start(args, msg); cnt = bvsnprintf(buf+size, sizeof(buf)-size-1, msg, args); + va_end(args); if (cnt < 0) { cli_printf(c, code < 0 ? -8000 : 8000, "");