[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 04/11] hw/usb: fix const-ness for string para
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v5 04/11] hw/usb: fix const-ness for string params in MTP driver |
Date: |
Wed, 10 Oct 2018 17:12:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 09/10/2018 15:04, Daniel P. Berrangé wrote:
> Various functions accepting 'char *' string parameters were missing
> 'const' qualifiers.
>
> Signed-off-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <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 f026419e47..ccbe25820b 100644
> --- a/hw/usb/dev-mtp.c
> +++ b/hw/usb/dev-mtp.c
> @@ -372,7 +372,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);
>
> @@ -454,7 +454,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);
> @@ -473,7 +473,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;
>
> @@ -640,7 +640,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;
>
>
- [Qemu-devel] [PATCH v5 00/11] Add a standard authorization framework, Daniel P . Berrangé, 2018/10/09
- [Qemu-devel] [PATCH v5 02/11] qom: don't require user creatable objects to be registered, Daniel P . Berrangé, 2018/10/09
- [Qemu-devel] [PATCH v5 01/11] util: add helper APIs for dealing with inotify in portable manner, Daniel P . Berrangé, 2018/10/09
- [Qemu-devel] [PATCH v5 03/11] hw/usb: don't set IN_ISDIR for inotify watch in MTP driver, Daniel P . Berrangé, 2018/10/09
- [Qemu-devel] [PATCH v5 04/11] hw/usb: fix const-ness for string params in MTP driver, Daniel P . Berrangé, 2018/10/09
- Re: [Qemu-devel] [PATCH v5 04/11] hw/usb: fix const-ness for string params in MTP driver,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v5 05/11] hw/usb: switch MTP to use new inotify APIs, Daniel P . Berrangé, 2018/10/09
- [Qemu-devel] [PATCH v5 10/11] authz: add QAuthZPAM object type for authorizing using PAM, Daniel P . Berrangé, 2018/10/09
[Qemu-devel] [PATCH v5 06/11] authz: add QAuthZ object as an authorization base class, Daniel P . Berrangé, 2018/10/09
[Qemu-devel] [PATCH v5 07/11] authz: add QAuthZSimple object type for easy whitelist auth checks, Daniel P . Berrangé, 2018/10/09