[spice-gtk] usb-device-manager: Remove useless cast

Submitted by Frediano Ziglio on July 26, 2019, 10:04 a.m.

Details

Message ID 20190726100402.16725-1-fziglio@redhat.com
State Accepted
Commit ff17992b9c5e54a32815bfc1d10a93d8e14115b4
Headers show
Series "usb-device-manager: Remove useless cast" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 26, 2019, 10:04 a.m.
spice_usb_device_new is already returning a SpiceUsbDevice pointer.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 src/usb-device-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index a530be9e..544e5687 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -776,7 +776,7 @@  static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager  *self,
         return;
     }
 
-    device = (SpiceUsbDevice*)spice_usb_device_new(bdev);
+    device = spice_usb_device_new(bdev);
     if (!device)
         return;
 

Comments

ack

On 7/26/19 1:04 PM, Frediano Ziglio wrote:
> spice_usb_device_new is already returning a SpiceUsbDevice pointer.
>
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>   src/usb-device-manager.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index a530be9e..544e5687 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -776,7 +776,7 @@ static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager  *self,
>           return;
>       }
>   
> -    device = (SpiceUsbDevice*)spice_usb_device_new(bdev);
> +    device = spice_usb_device_new(bdev);
>       if (!device)
>           return;
>