All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ALSA: snd-usb: drop unused varible assigments
@ 2014-10-19  7:11 Daniel Mack
  2014-10-19  7:11 ` [PATCH 2/2] ALSA: snd-usb: use strncpy() in mixer_quirks.c Daniel Mack
  2014-10-19  9:36 ` [PATCH 1/2] ALSA: snd-usb: drop unused varible assigments Takashi Iwai
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Mack @ 2014-10-19  7:11 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Daniel Mack

Don't assign 'len' in cases where we don't make use of the returned value.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 sound/usb/mixer.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 2e4a9db..63a8adb 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1290,9 +1290,8 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 						    kctl->id.name,
 						    sizeof(kctl->id.name), 1);
 			if (!len)
-				len = snprintf(kctl->id.name,
-					       sizeof(kctl->id.name),
-					       "Feature %d", unitid);
+				snprintf(kctl->id.name, sizeof(kctl->id.name),
+					 "Feature %d", unitid);
 		}
 
 		if (!mapped_name)
@@ -1305,9 +1304,9 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
 		 */
 		if (!mapped_name && !(state->oterm.type >> 16)) {
 			if ((state->oterm.type & 0xff00) == 0x0100)
-				len = append_ctl_name(kctl, " Capture");
+				append_ctl_name(kctl, " Capture");
 			else
-				len = append_ctl_name(kctl, " Playback");
+				append_ctl_name(kctl, " Playback");
 		}
 		append_ctl_name(kctl, control == UAC_FU_MUTE ?
 				" Switch" : " Volume");
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-20 14:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19  7:11 [PATCH 1/2] ALSA: snd-usb: drop unused varible assigments Daniel Mack
2014-10-19  7:11 ` [PATCH 2/2] ALSA: snd-usb: use strncpy() in mixer_quirks.c Daniel Mack
2014-10-19  9:38   ` Takashi Iwai
2014-10-20 14:40     ` Takashi Iwai
2014-10-20 14:47       ` Daniel Mack
2014-10-19  9:36 ` [PATCH 1/2] ALSA: snd-usb: drop unused varible assigments Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.