summaryrefslogtreecommitdiff
path: root/src/linux/sysfs-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/sysfs-utils.c')
-rw-r--r--src/linux/sysfs-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/sysfs-utils.c b/src/linux/sysfs-utils.c
index 8cdff8d..a1b7891 100644
--- a/src/linux/sysfs-utils.c
+++ b/src/linux/sysfs-utils.c
@@ -52,7 +52,7 @@ sysfs_get_double_with_error (const char *dir, const char *attribute)
filename = g_build_filename (dir, attribute, NULL);
if (g_file_get_contents (filename, &contents, NULL, NULL)) {
- result = atof (contents);
+ result = g_ascii_strtod (contents, NULL);
g_free (contents);
} else {
result = -1.0;
@@ -72,7 +72,7 @@ sysfs_get_double (const char *dir, const char *attribute)
result = 0.0;
filename = g_build_filename (dir, attribute, NULL);
if (g_file_get_contents (filename, &contents, NULL, NULL)) {
- result = atof (contents);
+ result = g_ascii_strtod (contents, NULL);
g_free (contents);
}
g_free (filename);