test: fix division by zero
authorMin Hu (Connor) <humin29@huawei.com>
Thu, 13 May 2021 01:10:37 +0000 (09:10 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 May 2021 07:23:00 +0000 (09:23 +0200)
commit07b3c7d8e3b6513044d8f5cc45359cc42c14eb18
tree25878dd4469f4af3521400e569178ce60c0b9762
parentdb7447c70820391f1225be0e6de6dab5710e6f18
test: fix division by zero

Variable i is used as a denominator which may be zero, and
this may result in segmentation fault.

This patch fixed it.

Fixes: 948bc3d6d095 ("test: add reciprocal based division")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/test/test_reciprocal_division_perf.c