From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:45233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyemX-0006mQ-Uc for qemu-devel@nongnu.org; Tue, 26 Feb 2019 10:36:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyemP-0002YP-Dj for qemu-devel@nongnu.org; Tue, 26 Feb 2019 10:36:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyemK-0002Uu-Ot for qemu-devel@nongnu.org; Tue, 26 Feb 2019 10:36:21 -0500 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 26 Feb 2019 15:35:13 +0000 Message-Id: <20190226153520.29821-5-berrange@redhat.com> In-Reply-To: <20190226153520.29821-1-berrange@redhat.com> References: <20190226153520.29821-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL v2 04/11] hw/usb: fix const-ness for string params in MTP driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , "Dr. David Alan Gilbert" , Gerd Hoffmann , Markus Armbruster , Michael Roth , =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake Various functions accepting 'char *' string parameters were missing 'const' qualifiers. Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 --- hw/usb/dev-mtp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index f0c52a476a..169ee50c02 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -383,7 +383,7 @@ static const USBDesc desc =3D { /* ---------------------------------------------------------------------= -- */ =20 static MTPObject *usb_mtp_object_alloc(MTPState *s, uint32_t handle, - MTPObject *parent, char *name) + MTPObject *parent, const char *na= me) { MTPObject *o =3D g_new0(MTPObject, 1); =20 @@ -465,7 +465,7 @@ static MTPObject *usb_mtp_object_lookup(MTPState *s, = uint32_t handle) } =20 static MTPObject *usb_mtp_add_child(MTPState *s, MTPObject *o, - char *name) + const char *name) { MTPObject *child =3D usb_mtp_object_alloc(s, s->next_handle++, o, name); @@ -484,7 +484,7 @@ static MTPObject *usb_mtp_add_child(MTPState *s, MTPO= bject *o, } =20 static MTPObject *usb_mtp_object_lookup_name(MTPObject *parent, - char *name, int len) + const char *name, int len) { MTPObject *iter; =20 @@ -651,7 +651,7 @@ static void usb_mtp_inotify_cleanup(MTPState *s) } } =20 -static int usb_mtp_add_watch(int inotifyfd, char *path) +static int usb_mtp_add_watch(int inotifyfd, const char *path) { uint32_t mask =3D IN_CREATE | IN_DELETE | IN_MODIFY; =20 --=20 2.20.1