1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00

Move va_end(ap) so we do not leave with return -1 without calling it.

Remove unneeded ';'
This commit is contained in:
Zdenek Kabelac 2010-11-23 15:00:52 +00:00
parent 728074ac83
commit b2594b047b

View File

@ -144,6 +144,8 @@ int dm_asprintf(char **result, const char *format, ...)
while (!ok) {
va_start(ap, format);
n = vsnprintf(buf, size, format, ap);
va_end(ap);
if (0 <= n && n < size)
ok = 1;
else {
@ -152,8 +154,7 @@ int dm_asprintf(char **result, const char *format, ...)
buf = dm_malloc(size);
if (!buf)
return -1;
};
va_end(ap);
}
}
*result = dm_strdup(buf);