From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuvkz-0004ZD-Gi for qemu-devel@nongnu.org; Mon, 14 Jan 2013 20:56:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuvky-0001t7-8I for qemu-devel@nongnu.org; Mon, 14 Jan 2013 20:56:05 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 15 Jan 2013 02:55:10 +0100 Message-Id: <1358214910-12581-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-1.4 v2] 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: qemu-trivial@nongnu.org, armbru@redhat.com, anthony@codemonkey.ws, =?UTF-8?q?Andreas=20F=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 --- include/qom/object.h | 2 +- qom/object.c | 2 +- 2 Dateien ge=C3=A4ndert, 2 Zeilen hinzugef=C3=BCgt(+), 2 Zeilen entfernt= (-) 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.7.10.4