examples/vhost: fix potentially overflowing expression
authorCheng Jiang <cheng1.jiang@intel.com>
Tue, 2 Feb 2021 07:24:21 +0000 (07:24 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 Feb 2021 17:19:36 +0000 (18:19 +0100)
commitee6e451f14103b0396ae6a0087bdd33c67a79e12
tree6ab5391403897ab667c5619045a3ee4e124c7538
parentd4d4c6fed60d764f5ad068fd0bda71f4bcba4fd7
examples/vhost: fix potentially overflowing expression

Change the type of buff_idx from uint64_t to uint32_t to fix coverity
issue.

Coverity issue: 366264
Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path")

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost/main.c