From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSr6J-00072C-Vq for qemu-devel@nongnu.org; Fri, 11 May 2012 10:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSr6H-00046t-Uz for qemu-devel@nongnu.org; Fri, 11 May 2012 10:45:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSr6H-00046k-Ky for qemu-devel@nongnu.org; Fri, 11 May 2012 10:45:45 -0400 Message-ID: <4FAD2611.9080403@redhat.com> Date: Fri, 11 May 2012 16:45:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1335958273-769-1-git-send-email-pbonzini@redhat.com> <1335958273-769-9-git-send-email-pbonzini@redhat.com> <4FAD2048.80606@suse.de> In-Reply-To: <4FAD2048.80606@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 08/21] qdev: use object_property_print in info qtree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, liwp@linux.vnet.ibm.com Il 11/05/2012 16:20, Andreas F=E4rber ha scritto: > char *string =3D NULL; >=20 >> > =20 >> > mo =3D string_output_visitor_new(); >> > - object_property_get(obj, string_output_get_visitor(mo), name, N= ULL); >> > + object_property_get(obj, string_output_get_visitor(mo), name, e= rrp); > If we do error checking we should be consequent and do: >=20 > if (!error_is_set(errp)) { >=20 >> > string =3D string_output_get_string(mo); > } >=20 >> > string_output_visitor_cleanup(mo); Or just say that it is part of the string_output_visitor interface that in case of an error the returned string is NULL. Paolo