summaryrefslogtreecommitdiff
path: root/thermalUtils.cpp
diff options
context:
space:
mode:
authorRam Chandrasekar <rkumbako@codeaurora.org>2020-08-06 14:39:40 -0700
committerRam Chandrasekar <rkumbako@codeaurora.org>2020-08-06 16:01:48 -0700
commit72110b5283c86afae170bb00ed5147496d6d780d (patch)
treeb0995eecf000c930843bb2c63bed79d56ef9e35b /thermalUtils.cpp
parentdac8f7dd5a799e95196072ac7ac0ff6b944867b0 (diff)
thermal-hal: Re-size cpu usage vector based on cpu count
Re-size cpu usage vector to cpu count size before filling in the data. This will ensure that sufficient memory is allocated before populating the data. Change-Id: I7a1d109cf3ec8403ca61beed9a9eab4287a3d33c
Diffstat (limited to 'thermalUtils.cpp')
-rw-r--r--thermalUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/thermalUtils.cpp b/thermalUtils.cpp
index 517b979..8bff8de 100644
--- a/thermalUtils.cpp
+++ b/thermalUtils.cpp
@@ -212,7 +212,7 @@ int ThermalUtils::readCdevStates(bool filterType, cdevType type,
return cdev_out->size();
}
-int ThermalUtils::fetchCpuUsages(hidl_vec<CpuUsage> *cpu_usages)
+int ThermalUtils::fetchCpuUsages(hidl_vec<CpuUsage>& cpu_usages)
{
return cmnInst.get_cpu_usages(cpu_usages);
}