提交 e39d3424 编写于 作者: P Peter Krempa

util: pci: Remove always-false condition

Commit d19c2142 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: NPeter Krempa <pkrempa@redhat.com>
上级 63d60408
......@@ -1288,14 +1288,6 @@ bool
virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
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 (report)
virReportError(VIR_ERR_XML_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册