numam-dpdk/examples/vhost
Jerin Jacob 62a0e941b5 examples/vhost: fix uninitialized descriptor indexes
Fixing the below error by returning from the function early
when count == 0.

Issue flagged by GCC 7.1.1

examples/vhost/virtio_net.c:370:38: error: ‘desc_indexes[0]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
  rte_prefetch0(&vr->desc[desc_indexes[0]]);

Fixes: ca059fa5e2 ("examples/vhost: demonstrate the new generic APIs")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-06-05 14:28:32 +02:00
..
main.c examples/vhost: fix socket path parsing 2017-05-10 19:05:59 +02:00
main.h examples/vhost: demonstrate the new generic APIs 2017-04-01 10:49:47 +02:00
Makefile examples/vhost: demonstrate the new generic APIs 2017-04-01 10:49:47 +02:00
virtio_net.c examples/vhost: fix uninitialized descriptor indexes 2017-06-05 14:28:32 +02:00