Received: from eggs.gnu.org ([2001:4830:134:3::10]:42787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw6-00004t-2b for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPKw3-0007Uq-Aw for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw3-0007Um-5O for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:03 -0400 From: Jason Wang Date: Tue, 19 Jul 2016 10:38:50 +0800 Message-Id: <1468895935-23097-2-git-send-email-jasowang@redhat.com> In-Reply-To: <1468895935-23097-1-git-send-email-jasowang@redhat.com> References: <1468895935-23097-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PULL V2 1/6] e1000e: fix incorrect access to pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org, qemu-devel@nongnu.org Cc: Paolo Bonzini , Jason Wang From: Paolo Bonzini This is not dereferencing the pointer, and instead checking only the value of the pointer. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 6050d8b..badb1fe 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes) /* Check if delayed RX interrupts disabled by client or if there are causes that cannot be delayed */ - if ((rdtr == 0) || (causes != 0)) { + if ((rdtr == 0) || (*causes != 0)) { return false; } @@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) *causes &= ~delayable_causes; /* If there are causes that cannot be delayed */ - if (causes != 0) { + if (*causes != 0) { return false; } -- 2.7.4