From b92233b32905aed746ad1ddd76332b4a76347edf Mon Sep 17 00:00:00 2001 From: Sameeh Jubran Date: Sun, 29 May 2016 09:37:25 +0300 Subject: e1000: Removing unnecessary if statement Since mit_delay can never be 0 this if statement is superfluous. Signed-off-by: Sameeh Jubran Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/net/e1000.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'hw') diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 36e3dbe347..1202371271 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -311,11 +311,9 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val) */ mit_delay = (mit_delay < 500) ? 500 : mit_delay; - if (mit_delay) { - s->mit_timer_on = 1; - timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + - mit_delay * 256); - } + s->mit_timer_on = 1; + timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + + mit_delay * 256); s->mit_ide = 0; } } -- cgit v1.2.3