Received: from eggs.gnu.org ([2001:4830:134:3::10]:52444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNyjk-0006Bk-51 for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:44:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNyji-0001HM-B0 for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:44:43 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNyji-0001HD-3i for qemu-devel@nongnu.org; Fri, 15 Jul 2016 04:44:42 -0400 Received: by mail-wm0-x242.google.com with SMTP id x83so1316222wma.3 for ; Fri, 15 Jul 2016 01:44:41 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 15 Jul 2016 10:44:38 +0200 Message-Id: <1468572278-24477-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] e1000e: fix incorrect access to pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jasowang@redhat.com This is not dereferencing the pointer, and instead checking only the value of the pointer. Signed-off-by: Paolo Bonzini --- 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