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

Yigit, Ferruh ferruh.yigit at intel.com
Fri Jul 10 17:39:36 CEST 2020


> 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).

+1


More information about the dev mailing list