summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-06-11 00:37:41 +0000
committerLennart Poettering <lennart@poettering.net>2008-06-11 00:37:41 +0000
commit67fde59fed36899afd3b5927acf065eb12743fa6 (patch)
tree8964c5b60ec9ae1f842f16450b4f46a4ee28be12 /src/pulsecore/core-util.c
parentca36968e0feb5d53c7efdc91667be8b7e9a1bd70 (diff)
replace pa_atof() by pa_atod() because floats are lame
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2506 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r--src/pulsecore/core-util.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 7f6a5d2b..c1f7fc3c 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1574,13 +1574,13 @@ static void c_locale_destroy(void) {
}
#endif
-int pa_atof(const char *s, float *ret_f) {
+int pa_atod(const char *s, double *ret_d) {
char *x = NULL;
- float f;
+ double f;
int r = 0;
pa_assert(s);
- pa_assert(ret_f);
+ pa_assert(ret_d);
/* This should be locale independent */
@@ -1595,22 +1595,18 @@ int pa_atof(const char *s, float *ret_f) {
if (c_locale) {
errno = 0;
- f = strtof_l(s, &x, c_locale);
+ f = strtod_l(s, &x, c_locale);
} else
#endif
{
errno = 0;
-#ifdef HAVE_STRTOF
- f = strtof(s, &x);
-#else
f = strtod(s, &x);
-#endif
}
if (!x || *x || errno != 0)
r = -1;
else
- *ret_f = f;
+ *ret_d = f;
return r;
}