aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-02-24 15:54:24 +0100
committerDamjan Marion <dmarion@me.com>2020-03-02 09:15:12 +0000
commit516e4ed668705bdf0fc138f29275db8c152d19f5 (patch)
tree94bd373a89cb59243fcd126972c7552294ee4d8e /src/vnet/devices
parentb29d523af039ac007238300a7316ba9e3e44ce25 (diff)
virtio: fix the coverity warning
Type: fix Change-Id: Ia75edb74eb7c746dd4c66bdbff75efb949575ce4 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices')
-rw-r--r--src/vnet/devices/virtio/node.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index d31fb144b8f..78a8dd54428 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -145,9 +145,6 @@ static_always_inline void
virtio_needs_csum (vlib_buffer_t * b0, struct virtio_net_hdr_v1 *hdr,
u8 * l4_proto, u8 * l4_hdr_sz)
{
- *l4_proto = 0;
- *l4_hdr_sz = 0;
-
if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM)
{
@@ -272,7 +269,7 @@ virtio_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
while (n_left && n_left_to_next)
{
- u8 l4_proto, l4_hdr_sz;
+ u8 l4_proto = 0, l4_hdr_sz = 0;
u16 num_buffers = 1;
struct vring_used_elem *e = &vring->used->ring[last & mask];
struct virtio_net_hdr_v1 *hdr;