[dpdk-dev] [dpdk-stable] [PATCH] test/eventdev: fix sprintf with snprintf

Aaron Conole aconole at redhat.com
Mon Apr 1 22:37:00 CEST 2019


Jerin Jacob Kollanukkaran <jerinj at marvell.com> writes:

> On Wed, 2019-03-13 at 10:35 -0400, Aaron Conole wrote:
>> 
>> > For all cases I expect truncation trigger a functional error which
>> > should be
>> > already handled properly, like in this case 'rte_vdev_init()' will
>> > fail in
>> > second call if buffer is small.
>> 
>> And give the user a bad error ("I said net_null1038123825, not
>> net_null10
>> - bug in dpdk!").
>> 
>> > There may be cases to check the return value, but that should be
>> > the case with
>> > 'sprintf' as well, changing API to 'snprintf' shouldn't require
>> > additional check
>> > by default.
>> 
>> I agree, that's true.  I think it's the right thing to do here,
>> though.
>
> Aaron,
>
> Are you expecting next version of this patch? Or I can merge this
> patch?

Go ahead and merge.


More information about the dev mailing list