aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-03-26 10:37:27 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:37:27 +0000
commit54b544c2f4c0b5425d6ff12596a9e82fd8d783d2 (patch)
tree3d603f8b90ce5f5f8f7af247ccd95437adc32056 /src
parentb546bcfec63822ad3bf3ae4ee71472dfa3aac010 (diff)
downloadmpd-54b544c2f4c0b5425d6ff12596a9e82fd8d783d2.tar.gz
mpd-54b544c2f4c0b5425d6ff12596a9e82fd8d783d2.tar.xz
mpd-54b544c2f4c0b5425d6ff12596a9e82fd8d783d2.zip
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
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_shout.c2
1 files changed, 1 insertions, 1 deletions
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);