From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtEEk-00034U-Ue for qemu-devel@nongnu.org; Fri, 03 Feb 2012 03:11:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtEEj-0005Bl-Q7 for qemu-devel@nongnu.org; Fri, 03 Feb 2012 03:11:14 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:33313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtEEj-0005Bg-K8 for qemu-devel@nongnu.org; Fri, 03 Feb 2012 03:11:13 -0500 Received: by eekd17 with SMTP id d17so1104405eek.4 for ; Fri, 03 Feb 2012 00:11:12 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F2B9699.2020303@redhat.com> Date: Fri, 03 Feb 2012 09:11:05 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> <1328201142-26145-8-git-send-email-pbonzini@redhat.com> <4F2B1079.2050104@suse.de> In-Reply-To: <4F2B1079.2050104@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 07/16] qdev: allow reusing get/set for legacy property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org On 02/02/2012 11:38 PM, Andreas Färber wrote: > Am 02.02.2012 17:45, schrieb Paolo Bonzini: >> In some cases, a legacy property does need a special print method >> but not a special parse method. In this case, we can reuse the get/set >> from the static (non-legacy) property. >> >> If neither parse nor print is needed, though, do not register the >> legacy property at all. The previous patch ensures that the right >> fallback will be used. >> >> Signed-off-by: Paolo Bonzini >> --- >> hw/qdev-monitor.c | 5 ++--- >> hw/qdev-properties.c | 6 +++--- >> hw/qdev.c | 11 +++++++---- >> 3 files changed, 12 insertions(+), 10 deletions(-) >> >> diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c >> index 64505b4..e21bd50 100644 >> --- a/hw/qdev-monitor.c >> +++ b/hw/qdev-monitor.c >> @@ -489,8 +489,8 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props, >> { >> if (!props) >> return; >> - while (props->name) { >> - Error *err; >> + for (; props->name; props++) { >> + Error *err = NULL; > > Do either of these fix a bug? Should be mentioned or avoided. [...] > > Bugfix? Yes, I squashed these in the wrong patch, thanks for catching it. Paolo