aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-10 14:03:33 +0200
committerMax Kellermann <max@duempel.org>2008-10-10 14:03:33 +0200
commit6101dc6c768b09dbcdc1840a84b619a5a6a20129 (patch)
treeaf2369299cff4af045fe8717584a29b6234aac51 /src/audio.c
parent817a033f5591fefb842e355ef211d09e855661ef (diff)
downloadmpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.tar.gz
mpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.tar.xz
mpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.zip
audio_format: unsigned integers
"bits" and "channels" cannot be negative.
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audio.c b/src/audio.c
index 9022061f4..bda0107ff 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -150,7 +150,7 @@ int parseAudioConfig(struct audio_format *audioFormat, char *conf)
return -1;
}
- audioFormat->bits = (int8_t)strtol(test + 1, &test, 10);
+ audioFormat->bits = (uint8_t)strtoul(test + 1, &test, 10);
if (*test != ':') {
ERROR("error parsing audio output format: %s\n", conf);
@@ -161,12 +161,12 @@ int parseAudioConfig(struct audio_format *audioFormat, char *conf)
case 16:
break;
default:
- ERROR("bits %i can not be used for audio output\n",
- (int)audioFormat->bits);
+ ERROR("bits %u can not be used for audio output\n",
+ audioFormat->bits);
return -1;
}
- audioFormat->channels = (int8_t)strtol(test + 1, &test, 10);
+ audioFormat->channels = (uint8_t)strtoul(test + 1, &test, 10);
if (*test != '\0') {
ERROR("error parsing audio output format: %s\n", conf);