summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <mznyfn@0pointer.de>2008-07-18 21:22:50 +0200
committerTakashi Iwai <tiwai@suse.de>2008-07-20 17:26:55 +0200
commit15769ead725b7c215dedd4ea5196955086d2044a (patch)
treec91848dec2dfb39b692b3e31786715c13182c05c
parent0fbfe2d8d6aac06e6615b7109ffc1fea8c62dee6 (diff)
downloadalsa-lib-15769ead725b7c215dedd4ea5196955086d2044a.tar.gz
fix type of internally used sframes variable, to avoid unnecessary casts
This minor patch fixes the type of the sframes variable in snd_pcm_plugin_forward(). With this fix we need to cast less and the code is less confusing. Signed-off-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--src/pcm/pcm_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index c199d8df..b377cb22 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -234,7 +234,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
{
snd_pcm_plugin_t *plugin = pcm->private_data;
snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm);
- snd_pcm_uframes_t sframes;
+ snd_pcm_sframes_t sframes;
if ((snd_pcm_uframes_t)n < frames)
frames = n;
@@ -246,8 +246,8 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
else
sframes = frames;
snd_atomic_write_begin(&plugin->watom);
- sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, (snd_pcm_uframes_t) sframes);
- if ((snd_pcm_sframes_t) sframes < 0) {
+ sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, sframes);
+ if (sframes < 0) {
snd_atomic_write_end(&plugin->watom);
return sframes;
}