[PATCH 3/4] app/testpmd: check for no arguments
fengchengwen
fengchengwen at huawei.com
Fri Mar 13 00:59:08 CET 2026
On 3/13/2026 1:03 AM, Stephen Hemminger wrote:
> On Thu, 12 Mar 2026 20:37:42 +0800
> fengchengwen <fengchengwen at huawei.com> wrote:
>
>> Hi Kevin,
>>
>> On 3/12/2026 6:36 PM, Kevin Traynor wrote:
>>> For the case where token is NULL, there are no arguments
>>> and split_str[0] is used uninitialized.
>>
>> In which case the token is NULL, if there are no arguments, the cmdline's
>> callback won't be invoke.
>>
>> Thanks
>
> It still maybe possible to get there with an empty string ""
> which would evaluate to no arguments?
No, as tested below:
testpmd> port config dcb vt on 4 pfc ""
Bad arguments
testpmd> port config dcb vt on 4 pfc ''
Bad arguments
testpmd> port config dcb vt on 4 pfc '
Bad arguments
testpmd> port config dcb vt on 4 pfc
Bad arguments
More information about the dev
mailing list