lkml.org 
[lkml]   [2008]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] ftrace: simple clean ups
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

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



\
 
 \ /
  Last update: 2008-04-18 22:19    [W:0.080 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site