Re: [patch] kernel events layer

Paul Jackson
2004-07-24T06:54:32Z

Keith wrote:
> Never use the return value from snprintf to work out the next buffer
> position, it is not reliable when the data is truncated.

That's why Juergen Quade added scnprintf and vscnprintf to lib/vsprintf.c:

* If you want to have the exact
* number of characters written into @buf as return value
* (not including the trailing '\0'), use vscnprintf.

Andrew wrote:
> A single snprintf here would suit.

As Robert said ... Doh!

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373