From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEIZg-0007JN-48 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 08:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEIZU-0000Qz-0U for qemu-devel@nongnu.org; Tue, 27 Aug 2013 08:40:43 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:38778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEIZT-0000Qf-E6 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 08:40:31 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Aug 2013 09:34:38 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 154D62CE804C for ; Tue, 27 Aug 2013 22:40:27 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7RCeGvi9175378 for ; Tue, 27 Aug 2013 22:40:16 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7RCeQeu031575 for ; Tue, 27 Aug 2013 22:40:26 +1000 From: Wenchao Xia Date: Tue, 27 Aug 2013 20:38:18 +0800 Message-Id: <1377607107-11612-7-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1377607107-11612-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1377607107-11612-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V10 06/15] monitor: call sortcmdlist() only one time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Wenchao Xia , armbru@redhat.com, lcapitulino@redhat.com It doesn't need to be done for every monitor, so change it. Signed-off-by: Wenchao Xia --- monitor.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index fffb434..db4d441 100644 --- a/monitor.c +++ b/monitor.c @@ -4762,6 +4762,7 @@ void monitor_init(CharDriverState *chr, int flags) if (is_first_init) { monitor_protocol_event_init(); + sortcmdlist(); is_first_init = 0; } @@ -4791,8 +4792,6 @@ void monitor_init(CharDriverState *chr, int flags) QLIST_INSERT_HEAD(&mon_list, mon, entry); if (!default_mon || (flags & MONITOR_IS_DEFAULT)) default_mon = mon; - - sortcmdlist(); } static void bdrv_password_cb(Monitor *mon, const char *password, void *opaque) -- 1.7.1