mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 08:05:24 +00:00
build: avoid older gcc warning
Jim Fehlig reported a compilation error with older gcc 4.3.4:
libvirt.c: In function 'virDomainGetEmulatorPinInfo':
libvirt.c:9111: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
It looks like someone programmed via too much copy-and-paste.
* src/libvirt.c (virDomainGetEmulatorPinInfo): Multiplying by 1 is
a no-op, and thus will never overflow.
(cherry picked from commit 3da355e8c4
)
This commit is contained in:
parent
e81632740f
commit
fdfb18690d
@ -9102,11 +9102,6 @@ virDomainGetEmulatorPinInfo(virDomainPtr domain, unsigned char *cpumap,
|
||||
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
goto error;
|
||||
}
|
||||
if (INT_MULTIPLY_OVERFLOW(1, maplen)) {
|
||||
virLibDomainError(VIR_ERR_OVERFLOW, _("input too large: 1 * %d"),
|
||||
maplen);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* At most one of these two flags should be set. */
|
||||
if ((flags & VIR_DOMAIN_AFFECT_LIVE) &&
|
||||
|
Loading…
Reference in New Issue
Block a user