Re: [PATCH 1/5] ftrace: simple clean ups

From: Andrew Morton
Date: Fri Apr 18 2008 - 16:16:36 EST


On Fri, 18 Apr 2008 16:05:39 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> 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).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/