Em Wed, Sep 18, 2013 at 03:29:03PM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <a...@ghostprotocols.net> wrote:
> > Em Wed, Sep 18, 2013 at 12:18:01PM +0200, Peter Zijlstra escreveu:
> > > len += snprintf(str + len, size - len, ...);
> > > len += snprintf(str + len, size - len, ...);

> > And avoid snprintf like the plague, use scnprintf instead...  See
> > e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0 for details :-)

> Hm, could we do:

>       #define snprintf scnprintf
> or:
>       #define snprintf(x...) BUILD_BUG()
> ?

Yes, I prefer the later, with a short explanation, will do.

- Arnaldo
 
> I don't think there's any valid code, except printf wrappers (which we 
> don't have in perf), where the semantics of snprintf() would be needed.
> 
> Thanks,
> 
>       Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to