From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My45j-0007Aj-DL for qemu-devel@nongnu.org; Wed, 14 Oct 2009 09:40:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My45e-00075E-Mb for qemu-devel@nongnu.org; Wed, 14 Oct 2009 09:40:35 -0400 Received: from [199.232.76.173] (port=56638 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My45e-00074z-Gk for qemu-devel@nongnu.org; Wed, 14 Oct 2009 09:40:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10861) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1My45c-0002OS-1X for qemu-devel@nongnu.org; Wed, 14 Oct 2009 09:40:29 -0400 Date: Wed, 14 Oct 2009 10:40:06 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 3/9] qmisc: Introduce qobject_from_va() Message-ID: <20091014104006.1329ec72@doriath> In-Reply-To: <87iqej55d9.fsf@pike.pond.sub.org> References: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> <1255453026-18637-4-git-send-email-lcapitulino@redhat.com> <87iqej55d9.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com On Tue, 13 Oct 2009 23:52:18 +0200 Markus Armbruster wrote: > 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... Because I'm using va_arg(), not sure if matters though.