mirror of https://gitee.com/openkylin/libvirt.git
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…
Reference in New Issue