diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2020-02-24 15:54:24 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-03-02 09:15:12 +0000 |
commit | 516e4ed668705bdf0fc138f29275db8c152d19f5 (patch) | |
tree | 94bd373a89cb59243fcd126972c7552294ee4d8e | |
parent | b29d523af039ac007238300a7316ba9e3e44ce25 (diff) |
virtio: fix the coverity warning
Type: fix
Change-Id: Ia75edb74eb7c746dd4c66bdbff75efb949575ce4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
-rw-r--r-- | src/vnet/devices/virtio/node.c | 5 |
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; |