diff --git a/src/util/util.c b/src/util/util.c index 4a720d8584fbfd27a96b6693048be183ae98c0f5..9068e0ff37fb7041c8b57193ca717182181ced20 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -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 */