Coverity complains about divide by zero if tx_queues gets the value of 0
from the macro vec_len(). While we don't anticipate such condition to
happen, programming errors may exist. To defend against divide by zero,
crash and burn if tx_queues gets a value of 0.
Change-Id: I65e014c07e9d4adfe119d5b373b5dc24cb818a03
Signed-off-by: Steven <sluong@cisco.com>
if (tx_queues < vec_len (vlib_mains))
{
+ ASSERT (tx_queues > 0);
qid = thread_index % tx_queues;
clib_spinlock_lock_if_init (&mif->lockp);
}