]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: fix locale problem with virStrToDouble().
authorJulio Faracco <jcfaracco@gmail.com>
Wed, 21 Jun 2017 17:08:29 +0000 (14:08 -0300)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 22 Jun 2017 09:30:20 +0000 (11:30 +0200)
commit96a9b9a7f0b6aad3a3696a17c92389ed7d7d0dd0
treecfd263b548c3a19439af79740e0202785935f9fd
parent5c54d29aaeb7bbbb219efc455562a63da9c2a68e
util: fix locale problem with virStrToDouble().

This commit fixes a locale problem with locales that use comma as a mantissa
separator. Example: 12.34 en_US = 12,34 pt_BR. Since strtod() is a non-safe
function, virStrToDouble() will have problems to parse double numbers from
kernel settings and other double numbers from static files (XMLs, JSONs, etc).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1457634
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1457481

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
src/util/virstring.c