lkml.org 
[lkml]   [2005]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.057 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site