]> git.droids-corp.org - dpdk.git/commit
app/fib: fix division by zero
authorVladimir Medvedkin <vladimir.medvedkin@intel.com>
Thu, 27 Jan 2022 18:08:53 +0000 (18:08 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 11 Feb 2022 07:50:13 +0000 (08:50 +0100)
commita01070dac90b76f735e3c8805c3b78357b078518
tree84782c1633e47c00756ca915ee39f75c3a139e00
parent5f69ebbd85300a197bbe9e6a630642352f5aba39
app/fib: fix division by zero

This patch fixes the division by 0, which occurs if the number of
routes is less than 10.
Can be triggered by passing -n argument with value < 10:

./dpdk-test-fib -- -n 9
...
Floating point exception (core dumped)

Fixes: 103809d032cd ("app/test-fib: add test application for FIB")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
app/test-fib/main.c