[dpdk-dev] [PATCH v7 02/25] ethdev: add a link status text representation

Ivan Dyukov i.dyukov at samsung.com
Fri Jul 10 20:51:53 CEST 2020


10.07.2020 18:22, Stephen Hemminger пишет:
> On Fri, 10 Jul 2020 13:06:02 +0000
> "Yigit, Ferruh" <ferruh.yigit at intel.com> wrote:
>
>>> +			/* ignore unknown specifier */
>>> +			default:
>>> +				*str_cur = '%';
>>> +				offset++;
>>> +				fmt_cur--;
>>> +				break;
>> What do you think ignoring the unknown specifiers and keep continue
>> processing the string, instead of break? Just keep unknown specifier
>> as it is in the output string.
> My comment was that the function should behave the same as
> snprintf() does when handed unknown specifier. What snprintf
> does is duplicate the string in the output buffer (like any
> other non format character).
Looks like I need to rewrite comment "ignore unkown specifier". It's not 
what code do. This function work like snprintf.




More information about the dev mailing list