shout: use strcmp() instead of strncasecmp()
Case insensitivity isn't helpful, and comparing only the first 3 bytes of a configured value may encourage users to supply wrong or misleading values.
This commit is contained in:
parent
ffed2fdca7
commit
ff69f12259
@ -191,9 +191,9 @@ static void *my_shout_init_driver(struct audio_output *audio_output,
|
|||||||
|
|
||||||
block_param = getBlockParam(param, "encoding");
|
block_param = getBlockParam(param, "encoding");
|
||||||
if (block_param) {
|
if (block_param) {
|
||||||
if (0 == strncasecmp(block_param->value, "mp3", 3))
|
if (0 == strcmp(block_param->value, "mp3"))
|
||||||
encoding = block_param->value;
|
encoding = block_param->value;
|
||||||
else if (0 == strncasecmp(block_param->value, "ogg", 3))
|
else if (0 == strcmp(block_param->value, "ogg"))
|
||||||
encoding = block_param->value;
|
encoding = block_param->value;
|
||||||
else
|
else
|
||||||
FATAL("shout encoding \"%s\" is not \"ogg\" or "
|
FATAL("shout encoding \"%s\" is not \"ogg\" or "
|
||||||
|
Loading…
Reference in New Issue
Block a user