]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
pcnet: remove dead nested assignment, spotted by clang
authorBlue Swirl <blauwirbel@gmail.com>
Wed, 13 Jan 2010 18:59:54 +0000 (18:59 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Wed, 13 Jan 2010 18:59:54 +0000 (18:59 +0000)
Although the value stored to 'addr' is used in the enclosing expression,
the value is never actually read from 'addr'.

Probably a typo.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/pcnet.c

index 91d106d5b10ff7f8fd20ad97a527a600bb0056ce..44b5b31483658ad53246bd3aca656851fa7aa1f9 100644 (file)
@@ -1608,7 +1608,7 @@ static void pcnet_aprom_writeb(void *opaque, uint32_t addr, uint32_t val)
 static uint32_t pcnet_aprom_readb(void *opaque, uint32_t addr)
 {
     PCNetState *s = opaque;
-    uint32_t val = s->prom[addr &= 15];
+    uint32_t val = s->prom[addr & 15];
 #ifdef PCNET_DEBUG
     printf("pcnet_aprom_readb addr=0x%08x val=0x%02x\n", addr, val);
 #endif