mempool: avoid division by zero
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Thu, 19 May 2016 12:36:35 +0000 (14:36 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 May 2016 09:09:31 +0000 (11:09 +0200)
commit125e39139b5f2854fb301123de3705049d1f9d68
treef2854f49804846d88a862c545f58c37c9ef4a6a3
parent587d684d70f9d7f74e77a886c58103b40409caea
mempool: avoid division by zero

In function call rte_mempool_xmem_size, division by expression total_size
which may be zero has undefined behavior.

Coverity issue: 13243
Fixes: 148f963fb532 ("xen: core library changes")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mempool/rte_mempool.c