qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
	kraxel@redhat.com, hollisb@linux.vnet.ibm.com,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 2/7] Introduce QError
Date: Fri, 30 Oct 2009 02:25:33 +0000	[thread overview]
Message-ID: <20091030022533.GC20292@shareable.org> (raw)
In-Reply-To: <4AEA125C.5040203@redhat.com>

Paolo Bonzini wrote:
> On 10/29/2009 09:48 PM, Luiz Capitulino wrote:
> >>  va_list doesn't need to be a pointer.
> >
> >  Ok, but if this is going to be a public interface, I think it's
> >better to va_copy() before passing it to qobject_from_json_va() then.
> 
> It is standard to pass a va_list by value without doing va_copy in the 
> caller.

That's right, just like:

    va_list ap;
    va_start(ap, format);
    vfprintf(stderr, format, ap);   /* <- passed by value */
    va_end(ap);

You only need va_copy() is you're going to use some more it after
passing it to the function.

There should be one va_end() for every va_start() plus every va_copy().

-- Jamie

  reply	other threads:[~2009-10-30  2:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 18:42 [Qemu-devel] [RFC 0/7] QError v1 Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 1/7] QJSon: Introduce qobject_from_json_va() Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 2/7] Introduce QError Luiz Capitulino
2009-10-29 20:14   ` [Qemu-devel] " Anthony Liguori
2009-10-29 20:48     ` Luiz Capitulino
2009-10-29 22:08       ` Paolo Bonzini
2009-10-30  2:25         ` Jamie Lokier [this message]
2009-10-30 13:05         ` Anthony Liguori
2009-10-30 13:48           ` Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 3/7] monitor: QError support Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 4/7] QError: Add QERR_DEV_NFOUND Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 5/7] qdev: Use QError for not found error Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 6/7] QError: Add do_info_balloon() errors Luiz Capitulino
2009-10-29 18:42 ` [Qemu-devel] [PATCH 7/7] monitor: do_info_balloon(): use QError Luiz Capitulino
2009-10-29 22:12 ` [Qemu-devel] Re: [RFC 0/7] QError v1 Paolo Bonzini
2009-10-30 12:28   ` Luiz Capitulino
2009-10-30 12:56     ` Gerd Hoffmann
2009-10-30 13:09       ` Anthony Liguori
2009-10-30 13:45         ` Paolo Bonzini
2009-10-30 13:47         ` Luiz Capitulino
2009-10-30 13:59           ` Anthony Liguori
2009-10-30 14:46             ` Luiz Capitulino
2009-10-30 16:28         ` Jamie Lokier
2009-10-30 16:34           ` Paolo Bonzini
2009-10-30 17:15           ` Daniel P. Berrange
2009-10-30 17:33             ` Paolo Bonzini
2009-10-30 17:48               ` Anthony Liguori
2009-11-01 12:28               ` Vincent Hanquez
2009-10-30 17:40           ` Anthony Liguori
2009-10-30 18:09             ` Jamie Lokier
2009-10-30 18:10               ` Paolo Bonzini
2009-10-30 19:04               ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091030022533.GC20292@shareable.org \
    --to=jamie@shareable.org \
    --cc=aliguori@us.ibm.com \
    --cc=hollisb@linux.vnet.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).