git » libfiu » commit d7934a2

libfiu: Use strtod() instead of strtof() for portability reasons

author Alberto Bertogli
2009-07-03 03:18:01 UTC
committer Alberto Bertogli
2009-07-03 03:18:01 UTC
parent 73d6ade2a76e7508061151e499b8bb685af42a2a

libfiu: Use strtod() instead of strtof() for portability reasons

Even though it's super standard, some platforms (current Dragonfly BSD,
although it will be fixed in the future) do not provide strtof(), so we
use strtod().

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libfiu/fiu-rc.c +1 -1

diff --git a/libfiu/fiu-rc.c b/libfiu/fiu-rc.c
index 11fddc4..92ef78c 100644
--- a/libfiu/fiu-rc.c
+++ b/libfiu/fiu-rc.c
@@ -116,7 +116,7 @@ static int rc_process_cmd(char *cmd)
 			tok = strtok_r(NULL, " ", &state);
 			if (tok == NULL)
 				return -1;
-			probability = strtof(tok, NULL);
+			probability = strtod(tok, NULL);
 			if (probability < 0 || probability > 1)
 				return -1;
 		}