mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: typos in fallback code fo virDoubleToStr
Fixes for some typos that somehow didn't get to the final push of the commit 43bfa23e6f968be9a8c134a4b5c3cfb6da3816d9.
This commit is contained in:
parent
3b0cd660ef
commit
0a6504d40c
@ -2106,7 +2106,7 @@ virDoubleToStr(char **strp, double number)
|
||||
char *radix, *tmp;
|
||||
struct lconv *lc;
|
||||
|
||||
if ((ret = virVasprintf(strp, "%lf", number) < 0)
|
||||
if ((ret = virAsprintf(strp, "%lf", number) < 0))
|
||||
goto error;
|
||||
|
||||
lc = localeconv();
|
||||
@ -2115,7 +2115,7 @@ virDoubleToStr(char **strp, double number)
|
||||
if (tmp) {
|
||||
*tmp = '.';
|
||||
if (strlen(radix) > 1)
|
||||
memmove(tmp + 1, tmp + strlen(radix), strlen(*strp) - (tmp - str));
|
||||
memmove(tmp + 1, tmp + strlen(radix), strlen(*strp) - (tmp - *strp));
|
||||
}
|
||||
|
||||
#endif /* HAVE_NEWLOCALE */
|
||||
|
Loading…
x
Reference in New Issue
Block a user