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:
Ján Tomko 2018-03-13 10:38:48 +01:00
parent c8ab5aeb14
commit 1ab2574731

View File

@ -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"));