summaryrefslogtreecommitdiff
path: root/sound/isa
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-07-17 18:06:10 +0300
committerTakashi Iwai <tiwai@suse.de>2018-07-17 18:18:03 +0300
commit7373c2a99abf2b11b5e8a226071331c0176253ff (patch)
treefef7bf1a48f41f6d3acb9509fed752f771f496bd /sound/isa
parente2d2f240497c63a157f897c87567b93ed43a2213 (diff)
downloadlinux-7373c2a99abf2b11b5e8a226071331c0176253ff.tar.xz
ALSA: emu8000: Use swap macro in snd_emu8000_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: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/sb/emu8000_patch.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c
index c2e41d2762f7..d45a6b9d6437 100644
--- a/sound/isa/sb/emu8000_patch.c
+++ b/sound/isa/sb/emu8000_patch.c
@@ -165,11 +165,8 @@ snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
return 0;
/* be sure loop points start < end */
- if (sp->v.loopstart > sp->v.loopend) {
- int tmp = sp->v.loopstart;
- sp->v.loopstart = sp->v.loopend;
- sp->v.loopend = tmp;
- }
+ if (sp->v.loopstart > sp->v.loopend)
+ swap(sp->v.loopstart, sp->v.loopend);
/* compute true data size to be loaded */
truesize = sp->v.size;