mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
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>
This commit is contained in:
parent
0fbfe2d8d6
commit
15769ead72
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue