lkml.org 
[lkml]   [2013]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2] kvm tools: remove redundant "if" condition
After we check (state.kcount != 0), state.kcount has to be 0 in all the "else"
branchs.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
tools/kvm/hw/i8042.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/kvm/hw/i8042.c b/tools/kvm/hw/i8042.c
index 9f8be6a..9035732 100644
--- a/tools/kvm/hw/i8042.c
+++ b/tools/kvm/hw/i8042.c
@@ -189,7 +189,7 @@ static u32 kbd_read_data(void)
state.mcount--;
kvm__irq_line(state.kvm, AUX_IRQ, 0);
kbd_update_irq();
- } else if (state.kcount == 0) {
+ } else {
i = state.kread - 1;
if (i < 0)
i = QUEUE_SIZE;
--
1.7.10.4


\
 
 \ /
  Last update: 2013-01-16 20:22    [W:0.114 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site