[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071024212110.GG27248@parisc-linux.org>
Date: Wed, 24 Oct 2007 15:21:10 -0600
From: Matthew Wilcox <matthew@....cx>
To: Kyle Moffett <mrmacman_g4@....com>
Cc: Linus Torvalds <torvalds@...l.org>, Andrew Morton <akpm@...l.org>,
linux-kernel@...r.kernel.org,
Matthew Wilcox <willy@...ux.intel.com>
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists