summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2014-02-03 17:49:09 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-03-27 10:22:02 +0100
commit25d32e762672eb7d577e382576ed8cdd3a8baa74 (patch)
tree2e4542e2b89cf54c2d0ed8dc6c29b6a06b6ead35
parent040afd211ddaa8cd55c3462b833c3f6220118aa2 (diff)
downloadvirtio-net-pmd-25d32e762672eb7d577e382576ed8cdd3a8baa74.zip
virtio-net-pmd-25d32e762672eb7d577e382576ed8cdd3a8baa74.tar.gz
virtio-net-pmd-25d32e762672eb7d577e382576ed8cdd3a8baa74.tar.xz
pmd: fix initialization of Tx queue header
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 <thomas.monjalon@6wind.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
-rw-r--r--virtio_user.c4
1 files 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;
}