|
perex |
37d715 |
From 15769ead725b7c215dedd4ea5196955086d2044a Mon Sep 17 00:00:00 2001
|
|
perex |
37d715 |
From: Lennart Poettering <mznyfn@0pointer.de>
|
|
perex |
37d715 |
Date: Fri, 18 Jul 2008 21:22:50 +0200
|
|
perex |
37d715 |
Subject: [PATCH] fix type of internally used sframes variable, to avoid unnecessary casts
|
|
perex |
37d715 |
|
|
perex |
37d715 |
This minor patch fixes the type of the sframes variable in
|
|
perex |
37d715 |
snd_pcm_plugin_forward(). With this fix we need to cast less and the
|
|
perex |
37d715 |
code is less confusing.
|
|
perex |
37d715 |
|
|
perex |
37d715 |
Signed-off-by: Lennart Poettering <lennart@poettering.net>
|
|
perex |
37d715 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
perex |
37d715 |
---
|
|
perex |
37d715 |
src/pcm/pcm_plugin.c | 6 +++---
|
|
perex |
37d715 |
1 files changed, 3 insertions(+), 3 deletions(-)
|
|
perex |
37d715 |
|
|
perex |
37d715 |
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
index c199d8d..b377cb2 100644
|
|
perex |
37d715 |
--- a/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
+++ b/src/pcm/pcm_plugin.c
|
|
perex |
37d715 |
@@ -234,7 +234,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
|
|
perex |
37d715 |
{
|
|
perex |
37d715 |
snd_pcm_plugin_t *plugin = pcm->private_data;
|
|
perex |
37d715 |
snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm);
|
|
perex |
37d715 |
- snd_pcm_uframes_t sframes;
|
|
perex |
37d715 |
+ snd_pcm_sframes_t sframes;
|
|
perex |
37d715 |
|
|
perex |
37d715 |
if ((snd_pcm_uframes_t)n < frames)
|
|
perex |
37d715 |
frames = n;
|
|
perex |
37d715 |
@@ -246,8 +246,8 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
|
|
perex |
37d715 |
else
|
|
perex |
37d715 |
sframes = frames;
|
|
perex |
37d715 |
snd_atomic_write_begin(&plugin->watom);
|
|
perex |
37d715 |
- sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, (snd_pcm_uframes_t) sframes);
|
|
perex |
37d715 |
- if ((snd_pcm_sframes_t) sframes < 0) {
|
|
perex |
37d715 |
+ sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, sframes);
|
|
perex |
37d715 |
+ if (sframes < 0) {
|
|
perex |
37d715 |
snd_atomic_write_end(&plugin->watom);
|
|
perex |
37d715 |
return sframes;
|
|
perex |
37d715 |
}
|
|
perex |
37d715 |
--
|
|
perex |
37d715 |
1.5.5.1
|
|
perex |
37d715 |
|