lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358298456-18377-2-git-send-email-dinggnu@gmail.com>
Date:	Wed, 16 Jan 2013 02:07:36 +0100
From:	Cong Ding <dinggnu@...il.com>
To:	Pekka Enberg <penberg@...nel.org>,
	Sasha Levin <levinsasha928@...il.com>,
	Asias He <asias.hejun@...il.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	Cong Ding <dinggnu@...il.com>
Subject: [PATCH] kvm: 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@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ