[dpdk-dev] [PATCH v6] af_packet: Fix some klocwork errors

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Mar 10 11:19:46 CET 2015


2015-03-10 08:49, Ouyang, Changchun:
> From: Wodkowski, PawelX
> > > +	if (kvlist != NULL)
> > 
> > No need for if(). This part was fine previous patch.
> >
> 
> If kvlist is NULL, no reason to call rte_kvargs_free to free it.
> So, adding this test is better.

No, we don't need to double check.
1/ it's already checked in rte_kvargs_free()
2/ less lines you write, better it is

> > > +		rte_kvargs_free(kvlist);
> > > +	return ret;
> > >   }



More information about the dev mailing list