summary refs log tree commit diff stats
path: root/hw/audio/sb16.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-08-11 21:00:53 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-08-15 18:54:06 +0400
commit2ab5bf67b7c3fe20f1645dadddd28b1881a25c47 (patch)
tree77cf390190ca2f682a05cdd71e643027d7c3a713 /hw/audio/sb16.c
parentd0657b2aab6f2a342aae2897e41d10061a9a6992 (diff)
downloadfocaccia-qemu-2ab5bf67b7c3fe20f1645dadddd28b1881a25c47.tar.gz
focaccia-qemu-2ab5bf67b7c3fe20f1645dadddd28b1881a25c47.zip
audio: don't use 'Yoda conditions'
imitate nearby code about using '!value' or 'value == NULL'

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/audio/sb16.c')
-rw-r--r--hw/audio/sb16.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index 60c4b3b497..bda26d0123 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -928,7 +928,7 @@ static IO_WRITE_PROTO (dsp_write)
 /*         if (s->highspeed) */
 /*             break; */
 
-        if (0 == s->needed_bytes) {
+        if (s->needed_bytes == 0) {
             command (s, val);
 #if 0
             if (0 == s->needed_bytes) {
@@ -1212,7 +1212,7 @@ static int SB_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len)
 #endif
 
     if (till <= copy) {
-        if (0 == s->dma_auto) {
+        if (s->dma_auto == 0) {
             copy = till;
         }
     }
@@ -1224,7 +1224,7 @@ static int SB_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len)
     if (s->left_till_irq <= 0) {
         s->mixer_regs[0x82] |= (nchan & 4) ? 2 : 1;
         qemu_irq_raise (s->pic);
-        if (0 == s->dma_auto) {
+        if (s->dma_auto == 0) {
             control (s, 0);
             speaker (s, 0);
         }