mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-05 13:18:20 +03:00
Move va_end(ap) so we do not leave with return -1 without calling it.
Remove unneeded ';'
This commit is contained in:
parent
728074ac83
commit
b2594b047b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user