Skip to contentSkip to conversation

ALSA: info: remove redundant assignment to variable c

PATCH Applied Colin King 2 participants 2 messages Feb 8, 2020 – Feb 10, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ALSA: info: remove redundant assignment to variable c

From: Colin Ian King <[email protected]>

Variable c is being assigned with the value -1 that is never read, it is assigned a new value in a following while-loop. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 sound/core/info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/info.c +1 -1
index ca87ae4c30ba..8c6bc5241df5 100644
@@ -604,7 +604,7 @@ int snd_info_card_free(struct snd_card *card)
  */
 int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
 {
-	int c = -1;
+	int c;
 
 	if (snd_BUG_ON(!buffer || !buffer->buffer))
 		return 1;
Signature · 1 line
2.25.0
Applied
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

Variable c is being assigned with the value -1 that is never read, it is assigned a new value in a following while-loop. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Thanks, applied.

Takashi