From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My4pO-0000dT-Ue for qemu-devel@nongnu.org; Wed, 14 Oct 2009 10:27:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My4pH-0000Zz-9K for qemu-devel@nongnu.org; Wed, 14 Oct 2009 10:27:44 -0400 Received: from [199.232.76.173] (port=52784 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My4pF-0000ZF-88 for qemu-devel@nongnu.org; Wed, 14 Oct 2009 10:27:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20531) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1My4pE-0001sl-Rm for qemu-devel@nongnu.org; Wed, 14 Oct 2009 10:27:37 -0400 Message-ID: <4AD5DFD2.40904@redhat.com> Date: Wed, 14 Oct 2009 16:27:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> <20091014104006.1329ec72@doriath> In-Reply-To: <20091014104006.1329ec72@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/9] qmisc: Introduce qobject_from_va() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, kraxel@redhat.com, Markus Armbruster , qemu-devel@nongnu.org >>> +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. No, you do not need that. The va_arg will be destructive, but anyway you're not going to do more than one pass on the va_list. Paolo