ALSA: info: remove redundant assignment to variable c
diff mbox series

Message ID 20200208224206.38540-1-colin.king@canonical.com
State New
Headers show
Series
  • ALSA: info: remove redundant assignment to variable c
Related show

Commit Message

Colin King Feb. 8, 2020, 10:42 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/core/info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai Feb. 10, 2020, 7:31 a.m. UTC | #1
On Sat, 08 Feb 2020 23:42:06 +0100,
Colin King wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied.


Takashi

Patch
diff mbox series

diff --git a/sound/core/info.c b/sound/core/info.c
index ca87ae4c30ba..8c6bc5241df5 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -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;