From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxpIA-0003fJ-9M for qemu-devel@nongnu.org; Tue, 13 Oct 2009 17:52:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxpI6-0003Zw-8Q for qemu-devel@nongnu.org; Tue, 13 Oct 2009 17:52:25 -0400 Received: from [199.232.76.173] (port=45905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxpI5-0003Zq-3e for qemu-devel@nongnu.org; Tue, 13 Oct 2009 17:52:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41461) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxpI4-0005Vc-Ll for qemu-devel@nongnu.org; Tue, 13 Oct 2009 17:52:20 -0400 Subject: Re: [Qemu-devel] [PATCH 3/9] qmisc: Introduce qobject_from_va() References: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> <1255453026-18637-4-git-send-email-lcapitulino@redhat.com> From: Markus Armbruster Date: Tue, 13 Oct 2009 23:52:18 +0200 In-Reply-To: <1255453026-18637-4-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Tue\, 13 Oct 2009 13\:57\:00 -0300") Message-ID: <87iqej55d9.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com Luiz Capitulino writes: > It will be used by the (to be introduced) QError module. > > Signed-off-by: Luiz Capitulino > --- > qmisc.c | 44 +++++++++++++++++++++++++++++++------------- > qmisc.h | 2 ++ > 2 files changed, 33 insertions(+), 13 deletions(-) > > diff --git a/qmisc.c b/qmisc.c > index 42b6f22..2bca278 100644 > --- a/qmisc.c > +++ b/qmisc.c > @@ -172,6 +172,36 @@ static QObject *build_qobject(const char **fmt, va_list *args) > } > > /** > + * qobject_from_va(): Create a QObject from the specified va_list > + * > + * Same as qobject_from_fmt(), but with a va_list argument. > + */ > +QObject *qobject_from_va(const char *format, va_list va) > +{ > + va_list lva; > + QObject *obj; > + const char *fmt = format; > + > + va_copy(lva, va); Why copy? Just curious... [...]