]> xenbits.xensource.com Git - libvirt.git/commit
vmx: Rework virVMXConfigScanResultsCollector slightly
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Oct 2022 10:18:40 +0000 (12:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Nov 2022 11:51:48 +0000 (12:51 +0100)
commitf0fc7cc76760ba4f4346755fe4b7757334b5d3c9
treed93d96575e35265c46da869b49e74322c78b1464
parentc428bccc3fc27379c438697a478171f492466220
vmx: Rework virVMXConfigScanResultsCollector slightly

The idea here is that virVMXConfigScanResultsCollector() sets the
networks_max_index to the highest ethernet index seen. Well, the
struct member is signed int, we parse just seen index into uint
and then typecast to compare the two. This is not necessary,
because the maximum number of NICs a vSphere domain can have is
(<drumrolll/>): ten [1]. This will fit into signed int easily
anywhere.

1: https://configmax.esp.vmware.com/guest?vmwareproduct=vSphere&release=vSphere%208.0&categories=1-0

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
src/vmx/vmx.c