Skip to contentSkip to conversation

ASoC: dapm: Remove redundant cast

PATCH Applied Rasmus Villemoes 2 participants 2 messages Oct 21, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: dapm: Remove redundant cast

Both path->name and e->texts[i] have type const char*, so the cast is slightly confusing and certainly unnecessary.

---
 sound/soc/soc-dapm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-dapm.c +1 -1
index c61cb9c..39f992b 100644
@@ -496,7 +496,7 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
 			list_add(&path->list, &dapm->card->paths);
 			list_add(&path->list_sink, &dest->sources);
 			list_add(&path->list_source, &src->sinks);
-			path->name = (char*)e->texts[i];
+			path->name = e->texts[i];
 			if (i == item)
 				path->connect = 1;
 			else
Signature · 1 line
2.0.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Rasmus Villemoes

Both path->name and e->texts[i] have type const char*, so the cast is slightly confusing and certainly unnecessary.

Applied, thanks.