From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWBKw-0004GZ-8U for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:45:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWBKp-000432-5q for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:44:59 -0400 Received: from [199.232.76.173] (port=42517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWBKp-00042q-01 for qemu-devel@nongnu.org; Wed, 29 Jul 2009 11:44:55 -0400 Date: Wed, 29 Jul 2009 12:44:41 -0300 From: Luiz Capitulino Message-ID: <20090729124441.6eaef2c4@doriath> In-Reply-To: <4A706B6A.5000905@gnu.org> References: <1248818713-11261-1-git-send-email-lcapitulino@redhat.com> <1248818713-11261-20-git-send-email-lcapitulino@redhat.com> <4A706B6A.5000905@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Paolo Bonzini Cc: jan.kiszka@siemens.com, aliguori@us.ibm.com, dlaor@redhat.com, qemu-devel@nongnu.org, avi@redhat.com On Wed, 29 Jul 2009 17:31:54 +0200 Paolo Bonzini wrote: > > > + 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. Yes, but this will be improved later, because info() handlers also use struct mon_cmd_t. This change is a bit beyond this patchset's goal.