[dpdk-dev] bnxt: use unsigned short instead of signed integer in bnxt_alloc_vnic_attributes
Commit Message
Prevent the arithmetic in bnxt_alloc_vnic_attributes from causing
any unintentional havoc because of the usage of a signed variable.
Coverity: 137874
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_vnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -179,7 +179,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
HW_HASH_INDEX_SIZE * sizeof(*vnic->rss_table) +
HW_HASH_KEY_SIZE);
uint16_t max_vnics;
- int i;
+ uint16_t i;
if (BNXT_PF(bp)) {
struct bnxt_pf_info *pf = &bp->pf;