[alsa-devel] [PATCH] ASoC: core: No need to use strncmp()
Dimitris Papastamos
dp at opensource.wolfsonmicro.com
Wed Jul 31 10:44:13 CEST 2013
Signed-off-by: Dimitris Papastamos <dp at opensource.wolfsonmicro.com>
---
sound/soc/soc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d68a486..9f60894 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2309,7 +2309,7 @@ struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
return NULL;
list_for_each_entry(kctl, &card->controls, list)
- if (!strncmp(kctl->id.name, name, sizeof(kctl->id.name)))
+ if (!strcmp(kctl->id.name, name))
return kctl;
return NULL;
}
@@ -3056,7 +3056,7 @@ int snd_soc_limit_volume(struct snd_soc_codec *codec,
return -EINVAL;
list_for_each_entry(kctl, &card->controls, list) {
- if (!strncmp(kctl->id.name, name, sizeof(kctl->id.name))) {
+ if (!strcmp(kctl->id.name, name)) {
found = 1;
break;
}
--
1.8.3.4
More information about the Alsa-devel
mailing list