Skip to content

Commit

Permalink
[ALSA] pcm_native: fix sparse warning about shadowing 'state' symbol
Browse files Browse the repository at this point in the history
pcm_native: fix sparse warning about shadowing 'state' symbol

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Marcin Ślusarz authored and Jaroslav Kysela committed Jan 31, 2008
1 parent cd0b4ac commit b05e578
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,10 +1395,10 @@ static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state)
} else {
/* stop running stream */
if (runtime->status->state == SNDRV_PCM_STATE_RUNNING) {
int state = snd_pcm_capture_avail(runtime) > 0 ?
int new_state = snd_pcm_capture_avail(runtime) > 0 ?
SNDRV_PCM_STATE_DRAINING : SNDRV_PCM_STATE_SETUP;
snd_pcm_do_stop(substream, state);
snd_pcm_post_stop(substream, state);
snd_pcm_do_stop(substream, new_state);
snd_pcm_post_stop(substream, new_state);
}
}
return 0;
Expand Down

0 comments on commit b05e578

Please sign in to comment.