Received: from eggs.gnu.org ([2001:4830:134:3::10]:42810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw8-00004y-3Z for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPKw6-0007VH-0W for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPKw5-0007VD-R3 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 22:39:05 -0400 From: Jason Wang Date: Tue, 19 Jul 2016 10:38:51 +0800 Message-Id: <1468895935-23097-3-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 2/6] net: 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 --- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 95fe15c..c147c2e 100644 --- a/net/eth.c +++ b/net/eth.c @@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int iovcnt, *l4hdr_off, sizeof(l4hdr_info->hdr.tcp), &l4hdr_info->hdr.tcp); - if (istcp) { + if (*istcp) { *l5hdr_off = *l4hdr_off + TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp); -- 2.7.4