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

Frediano Ziglio fziglio at redhat.com
Fri Jul 26 10:04:02 UTC 2019


spice_usb_device_new is already returning a SpiceUsbDevice pointer.

Signed-off-by: Frediano Ziglio <fziglio at 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;
 
-- 
2.20.1



More information about the Spice-devel mailing list