summaryrefslogtreecommitdiffstats
path: root/nest/cli.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2004-05-31 20:08:50 +0200
committerMartin Mares <mj@ucw.cz>2004-05-31 20:08:50 +0200
commit277a34eff195fe39a63db59731f5f2c8d54abdb2 (patch)
treecef15bee3d87c395e18a742e305b2353e09ac0af /nest/cli.c
parent5f2a6a9ff324d846c86ffafb60ae5a4c01d06313 (diff)
downloadbird-277a34eff195fe39a63db59731f5f2c8d54abdb2.tar
bird-277a34eff195fe39a63db59731f5f2c8d54abdb2.zip
Small correction to va_start/va_end in cli_printf (va_end was missing).
(Andreas)
Diffstat (limited to 'nest/cli.c')
-rw-r--r--nest/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nest/cli.c b/nest/cli.c
index e3f9ccf..bd487d8 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, "<line overflow>");