examples/power: allow number of VMs to be zero
authorDavid Hunt <david.hunt@intel.com>
Wed, 17 Oct 2018 13:05:26 +0000 (14:05 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 26 Oct 2018 08:48:03 +0000 (10:48 +0200)
commit395e97bf801b6b4f0d343c95874b5303324c4def
treecac2cca50a79e1c22b4e1c23a6b69856ff615058
parente0207366b173c78a92603ed2519a0e5eb04b0dc0
examples/power: allow number of VMs to be zero

Previously the vm_power_manager app required to have some vms defined, so
the call to get_all_vm() always set the noVms variable. Now we're accepting
policies from the host OS (without any VMs defined), so it is now valid to
have zero VMs. This patch initialises the relevant variables to zero just
in case the call to get_all_vms() does not find any, so could return with
the variables uninitialised.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
examples/vm_power_manager/channel_monitor.c