Received: from eggs.gnu.org ([208.118.235.92]:39272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA5M-0002Cn-Fe for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvA5J-0004Wa-84 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvA5I-0004VM-Up for qemu-devel@nongnu.org; Tue, 15 Jan 2013 12:14:01 -0500 From: Stefan Hajnoczi Date: Tue, 15 Jan 2013 18:13:52 +0100 Message-Id: <1358270033-18064-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1358270033-18064-1-git-send-email-stefanha@redhat.com> References: <1358270033-18064-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 2/3] qom: Make object_resolve_path_component() path argument const List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefan Hajnoczi From: Andreas F=C3=A4rber A usage with a hardcoded partial path such as object_resolve_path_component(obj, "foo") is totally valid but currently leads to a compilation error. Fix this. Signed-off-by: Andreas F=C3=A4rber Signed-off-by: Stefan Hajnoczi --- include/qom/object.h | 2 +- qom/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index d43b289..1ef2f0e 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -900,7 +900,7 @@ Object *object_resolve_path_type(const char *path, co= nst char *typename, * * Returns: The resolved object or NULL on path lookup failure. */ -Object *object_resolve_path_component(Object *parent, gchar *part); +Object *object_resolve_path_component(Object *parent, const gchar *part)= ; =20 /** * object_property_add_child: diff --git a/qom/object.c b/qom/object.c index 351b88c..03e6f24 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1017,7 +1017,7 @@ gchar *object_get_canonical_path(Object *obj) return newpath; } =20 -Object *object_resolve_path_component(Object *parent, gchar *part) +Object *object_resolve_path_component(Object *parent, const gchar *part) { ObjectProperty *prop =3D object_property_find(parent, part, NULL); if (prop =3D=3D NULL) { --=20 1.8.0.2