summaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1
diff options
context:
space:
mode:
authorGustavo A. R. Silva2018-07-17 17:00:43 +0200
committerTakashi Iwai2018-07-17 17:17:52 +0200
commite2d2f240497c63a157f897c87567b93ed43a2213 (patch)
tree73587ddc194ade386ca198698a498e9022c6ca06 /sound/pci/emu10k1
parentALSA: hda: use PCI_BASE_CLASS_DISPLAY to replace PCI_CLASS_DISPLAY_VGA (diff)
downloadkernel-qcow2-linux-e2d2f240497c63a157f897c87567b93ed43a2213.tar.gz
kernel-qcow2-linux-e2d2f240497c63a157f897c87567b93ed43a2213.tar.xz
kernel-qcow2-linux-e2d2f240497c63a157f897c87567b93ed43a2213.zip
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: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r--sound/pci/emu10k1/emu10k1_patch.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/pci/emu10k1/emu10k1_patch.c b/sound/pci/emu10k1/emu10k1_patch.c
index 0e069aeab86d..c32eb7053715 100644
--- a/sound/pci/emu10k1/emu10k1_patch.c
+++ b/sound/pci/emu10k1/emu10k1_patch.c
@@ -70,11 +70,8 @@ snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
loopend = sampleend;
/* 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 + BLANK_HEAD_SIZE;