lkml.org 
[lkml]   [2007]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] stringbuf: A string buffer implementation
On Wed, Oct 24, 2007 at 04:59:48PM -0400, Kyle Moffett wrote:
> This seems unlikely to work reliably as the various "v*printf"
> functions modify the va_list argument they are passed. It may happen
> to work on your particular architecture depending on how that
> argument data is passed and stored, but you probably actually want to
> make a copy of the varargs list for the first vsnprintf call.

I based what I did on how printk works:

va_start(args, fmt);
r = vprintk(fmt, args);
va_end(args);

It doesn't call va_* anywhere else. I don't claim to be a varargs expert,
but if I'm wrong, I'm at least wrong the same way that printk is, so not
in any way that's significant for any other architecture Linux runs on.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-24 23:25    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site