public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
@ 2005-03-23 23:41 Adrian Bunk
  2005-03-24 12:04 ` [Alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-03-23 23:41 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, linux-kernel

The Coverity checker found this obviously dead code.

I'mnot sure which of the if (plugin == NULL) is correct - this patch 
removes the one that couldn't be true.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c.old	2005-03-23 01:06:58.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c	2005-03-23 01:07:41.000000000 +0100
@@ -657,22 +657,19 @@ static int snd_pcm_plug_playback_channel
 	if (plugin == NULL) {
 		return 0;
 	} else {
 		int schannels = plugin->dst_format.channels;
 		bitset_t bs[bitset_size(schannels)];
 		bitset_t *srcmask;
 		bitset_t *dstmask = bs;
 		int err;
 		bitset_one(dstmask, schannels);
-		if (plugin == NULL) {
-			bitset_and(client_vmask, dstmask, schannels);
-			return 0;
-		}
+
 		while (1) {
 			err = plugin->src_channels_mask(plugin, dstmask, &srcmask);
 			if (err < 0)
 				return err;
 			dstmask = srcmask;
 			if (plugin->prev == NULL)
 				break;
 			plugin = plugin->prev;
 		}


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

* Re: [Alsa-devel] [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
  2005-03-23 23:41 [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code Adrian Bunk
@ 2005-03-24 12:04 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2005-03-24 12:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel

At Thu, 24 Mar 2005 00:41:28 +0100,
Adrian Bunk wrote:
> 
> The Coverity checker found this obviously dead code.
> 
> I'mnot sure which of the if (plugin == NULL) is correct - this patch 
> removes the one that couldn't be true.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Thanks, I applied it to ALSA tree.


Takashi

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

end of thread, other threads:[~2005-03-24 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-23 23:41 [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code Adrian Bunk
2005-03-24 12:04 ` [Alsa-devel] " Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox