mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 04:15:49 +00:00
util: pci: Remove always-false condition
Commit d19c21429f
modified the condition so that it checks whether the
value is more than 0xFFFFFFFF. Since addr->domain is an unsigned int, it
will never be more than that.
Remove the whole check
src/util/virpci.c:1291:22: error: result of comparison 'unsigned int' > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
if (addr->domain > 0xFFFFFFFF) {
~~~~~~~~~~~~ ^ ~~~~~~~~~~
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
63d604088c
commit
e39d3424e3
@ -1288,14 +1288,6 @@ bool
|
|||||||
virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
|
virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
|
||||||
bool report)
|
bool report)
|
||||||
{
|
{
|
||||||
if (addr->domain > 0xFFFFFFFF) {
|
|
||||||
if (report)
|
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
|
||||||
_("Invalid PCI address domain='0x%x', "
|
|
||||||
"must be <= 0xFFFF"),
|
|
||||||
addr->domain);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (addr->bus > 0xFF) {
|
if (addr->bus > 0xFF) {
|
||||||
if (report)
|
if (report)
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user