[pve-devel] [PATCH v4 qemu-server 1/4] usb: Cleanup redundant if condition

Aaron Lauterer a.lauterer at proxmox.com
Wed Sep 11 14:43:31 CEST 2019


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/QemuServer/USB.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index a2097b9..2c09490 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -86,7 +86,7 @@ sub get_usb_devices {
 	if (defined($d->{host})) {
 	    my $hostdevice = parse_usb_device($d->{host});
 	    $hostdevice->{usb3} = $d->{usb3};
-	    if (defined($hostdevice->{spice}) && $hostdevice->{spice}) {
+	    if ($hostdevice->{spice}) {
 		# usb redir support for spice, currently no usb3
 		push @$devices, '-chardev', "spicevmc,id=usbredirchardev$i,name=usbredir";
 		push @$devices, '-device', "usb-redir,chardev=usbredirchardev$i,id=usbredirdev$i,bus=ehci.0";
-- 
2.20.1





More information about the pve-devel mailing list