Skip to content
Snippets Groups Projects
Commit d74d72c7 authored by oharboe's avatar oharboe
Browse files

Pavel Chromy: va_copy should always be paired with va_end.

git-svn-id: svn://svn.berlios.de/openocd/trunk@459 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent ff59d1c4
No related branches found
No related tags found
No related merge requests found
......@@ -288,6 +288,9 @@ char *alloc_printf(const char *fmt, va_list ap)
int ret;
ret = vsnprintf(string, size, fmt, ap_copy);
va_end(ap_copy);
/* NB! The result of the vsnprintf() might be an *EMPTY* string! */
if ((ret >= 0) && ((ret + 1) < size))
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment