From 54b544c2f4c0b5425d6ff12596a9e82fd8d783d2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Mar 2008 10:37:27 +0000 Subject: parse/initialize with the correct data type When we expect an integer as result, why would we use the double precision floating point parser? strtol() is a better match, although we should probably check for overflows... git-svn-id: https://svn.musicpd.org/mpd/trunk@7198 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_shout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c index beacfeef9..87a35e9b2 100644 --- a/src/audioOutputs/audioOutput_shout.c +++ b/src/audioOutputs/audioOutput_shout.c @@ -218,7 +218,7 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) /* optional paramters */ blockParam = getBlockParam(param, "timeout"); if (blockParam) { - sd->timeout = strtod(blockParam->value, &test); + sd->timeout = (int)strtol(blockParam->value, &test, 10); if (*test != '\0' || sd->timeout <= 0) { FATAL("shout timeout is not a positive integer, " "line %i\n", blockParam->line); -- cgit v1.2.3