(try): reset va_list argument between reuse, from Peter Kruty <xkruty@fi.muni.cz>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14708 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-04-01 08:40:40 +00:00
parent 6ac6552a8a
commit 55e1336d94

View File

@@ -51,6 +51,8 @@ try (const char *format, ...)
ret = vsnprintf (buf1, sizeof(buf1), format, ap);
if (ret >= sizeof(buf1))
errx (1, "increase buf and try again");
va_end (ap);
va_start (ap, format);
vsprintf (buf2, format, ap);
ret = strcmp (buf1, buf2);
if (ret)