qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 04/11] hw/usb: fix const-ness for string params i


From: Daniel P . Berrangé
Subject: [Qemu-devel] [PATCH v4 04/11] hw/usb: fix const-ness for string params in MTP driver
Date: Thu, 16 Aug 2018 14:01:11 +0100

Various functions accepting 'char *' string parameters were missing
'const' qualifiers.

Signed-off-by: Daniel P. Berrangé <address@hidden>
---
 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 80f88e40fa..d5f570fb56 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -368,7 +368,7 @@ static const USBDesc desc = {
 /* ----------------------------------------------------------------------- */
 
 static MTPObject *usb_mtp_object_alloc(MTPState *s, uint32_t handle,
-                                       MTPObject *parent, char *name)
+                                       MTPObject *parent, const char *name)
 {
     MTPObject *o = g_new0(MTPObject, 1);
 
@@ -450,7 +450,7 @@ static MTPObject *usb_mtp_object_lookup(MTPState *s, 
uint32_t handle)
 }
 
 static MTPObject *usb_mtp_add_child(MTPState *s, MTPObject *o,
-                                    char *name)
+                                    const char *name)
 {
     MTPObject *child =
         usb_mtp_object_alloc(s, s->next_handle++, o, name);
@@ -469,7 +469,7 @@ static MTPObject *usb_mtp_add_child(MTPState *s, MTPObject 
*o,
 }
 
 static MTPObject *usb_mtp_object_lookup_name(MTPObject *parent,
-                                             char *name, int len)
+                                             const char *name, int len)
 {
     MTPObject *iter;
 
@@ -636,7 +636,7 @@ static void usb_mtp_inotify_cleanup(MTPState *s)
     }
 }
 
-static int usb_mtp_add_watch(int inotifyfd, char *path)
+static int usb_mtp_add_watch(int inotifyfd, const char *path)
 {
     uint32_t mask = IN_CREATE | IN_DELETE | IN_MODIFY;
 
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]