From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: [PATCH] kvm: fix typo of || to && in arch/x86/kvm/vmx.c Date: Tue, 17 Feb 2009 13:17:34 +0800 Message-ID: <499A486E.7040209@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit To: Avi Kivity , kvm@vger.kernel.org, yjwei@cn.fujitsu.com Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:53474 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752507AbZBQFSD (ORCPT ); Tue, 17 Feb 2009 00:18:03 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Fix the typo of || to &&. Signed-off-by: Wei Yongjun --- arch/x86/kvm/vmx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6259d74..3f3cab2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1813,7 +1813,7 @@ static bool stack_segment_valid(struct kvm_vcpu *vcpu) vmx_get_segment(vcpu, &ss, VCPU_SREG_SS); ss_rpl = ss.selector & SELECTOR_RPL_MASK; - if ((ss.type != 3) || (ss.type != 7)) + if ((ss.type != 3) && (ss.type != 7)) return false; if (!ss.s) return false; @@ -1856,7 +1856,7 @@ static bool tr_valid(struct kvm_vcpu *vcpu) if (tr.selector & SELECTOR_TI_MASK) /* TI = 1 */ return false; - if ((tr.type != 3) || (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */ + if ((tr.type != 3) && (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */ return false; if (!tr.present) return false; -- 1.5.3.8