mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemuDomainUSBAddressAddHubs: use numeric comparison
Since data.count is not a pointer, but an integer, compare it against an integer value instead of using the implicit "boolean" conversion that is customarily used for pointers. Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c8ab5aeb14
commit
1ab2574731
@ -2701,7 +2701,7 @@ qemuDomainUSBAddressAddHubs(virDomainDefPtr def)
|
||||
&data,
|
||||
false));
|
||||
|
||||
if (data.count && !virDomainDefHasUSB(def)) {
|
||||
if (data.count > 0 && !virDomainDefHasUSB(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("USB is disabled for this domain, but USB devices "
|
||||
"are present in the domain XML"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user