Messages in this thread | | | Date | Fri, 18 Apr 2008 23:09:38 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [PATCH 1/5] ftrace: simple clean ups |
| |
On Fri, 18 Apr 2008, Andrew Morton wrote:
> On Fri, 18 Apr 2008 16:05:39 -0400 > Steven Rostedt <rostedt@goodmis.org> wrote: > > > - r = snprintf(buf, 64, "%ld\n", > > + r = snprintf(buf, sizeof(buf), "%ld\n", > > If you use scnprintf here
Cool, I didn't know of that function.
> > > *ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr)); > > - if (r > 64) > > - r = 64; > > + if (r > sizeof(buf)) > > + r = sizeof(buf); > > This becomes a cant-happen (I think).
Yep it does. New patch on the way.
Thanks,
-- Steve
| |