lkml.org 
[lkml]   [2013]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: Support for Openembedded/Yocto -dbg packages

* Arnaldo Carvalho de Melo <acme@ghostprotocols.net> wrote:

> Em Wed, Sep 18, 2013 at 12:18:01PM +0200, Peter Zijlstra escreveu:
> > On Wed, Sep 18, 2013 at 12:02:12PM +0200, Ricardo Ribalda Delgado wrote:
> > > Perhaps this is even more clear than v2:
>
> > > len = snprintf(file, size, "%s", symbol_conf.symfs);
> > > size -= len;
> > > file += len;
> > > len = snprintf(file, MIN(size,(last_slash - dso->long_name) + 2),
> > > "%s", dso->long_name);
> > > size -= len;
> > > file += len;
> > > len = snprintf(file, size, ".debug%s", last_slash);
>
> > len = 0;
>
> > 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()

?

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


\
 
 \ /
  Last update: 2013-09-18 16:01    [W:0.076 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site