Commit e2d2f240 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Takashi Iwai

ALSA: emu10k1_patch: Use swap macro in snd_emu10k1_sample_new

Make use of the swap macro and remove unnecessary variable *tmp*. This
makes the code easier to read and maintain.

This code was detected with the help of Coccinelle.
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b6d7b362
...@@ -70,11 +70,8 @@ snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp, ...@@ -70,11 +70,8 @@ snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
loopend = sampleend; loopend = sampleend;
/* be sure loop points start < end */ /* be sure loop points start < end */
if (sp->v.loopstart >= sp->v.loopend) { if (sp->v.loopstart >= sp->v.loopend)
int tmp = sp->v.loopstart; swap(sp->v.loopstart, sp->v.loopend);
sp->v.loopstart = sp->v.loopend;
sp->v.loopend = tmp;
}
/* compute true data size to be loaded */ /* compute true data size to be loaded */
truesize = sp->v.size + BLANK_HEAD_SIZE; truesize = sp->v.size + BLANK_HEAD_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment