From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWB8O-0002Vp-Nx for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:32:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWB8J-0002VN-P3 for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:32:03 -0400 Received: from [199.232.76.173] (port=54520 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWB8J-0002VK-Ib for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:31:59 -0400 Received: from mail-fx0-f206.google.com ([209.85.220.206]:58610) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWB8J-0001BD-3b for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:31:59 -0400 Received: by fxm2 with SMTP id 2so44115fxm.28 for ; Wed, 29 Jul 2009 08:31:55 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4A706B6A.5000905@gnu.org> Date: Wed, 29 Jul 2009 17:31:54 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1248818713-11261-1-git-send-email-lcapitulino@redhat.com> <1248818713-11261-20-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1248818713-11261-20-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 19/25] monitor: Split monitor_handle_command() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: jan.kiszka@siemens.com, aliguori@us.ibm.com, dlaor@redhat.com, qemu-devel@nongnu.org, avi@redhat.com > + if (cmd) { > + void (*handler)(Monitor *mon, const struct qemu_dict *qdict); > + handler = cmd->handler; > + handler(mon, qdict); > + } I'd prefer cmd->handler(mon, qdict). One less place to change if you change the arguments later. Paolo