From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [virtio-net-pmd PATCH 08/16] pmd: fix initialization of Tx queue header Date: Tue, 4 Feb 2014 16:54:23 +0100 Message-ID: <1391529271-24606-9-git-send-email-thomas.monjalon@6wind.com> References: <1391529271-24606-1-git-send-email-thomas.monjalon@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1391529271-24606-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" A typo was found by gcc-4.8: virtio_user.c:744:15: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] sizeof(tq->tx_hdrs[sz - 1].header)); ^ Signed-off-by: Thomas Monjalon --- virtio_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtio_user.c b/virtio_user.c index 1074bd8..a5f81df 100644 --- a/virtio_user.c +++ b/virtio_user.c @@ -1,5 +1,5 @@ /* - * Copyright 2013 6WIND S.A. + * Copyright 2013-2014 6WIND S.A. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -741,7 +741,7 @@ virtio_alloc_txq(struct virtio_net_vring* tq, int sz) } /* Reserve a NULL header for NO OP on hypervisor side. */ memset(tq->tx_hdrs[sz - 1].header, 0, - sizeof(tq->tx_hdrs[sz - 1].header)); + sizeof(*tq->tx_hdrs[sz - 1].header)); return 0; } -- 1.7.10.4