summaryrefslogtreecommitdiff
path: root/sensors/common/default/2.X/Sensor.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2022-02-09 15:35:58 -0800
committerChih-Hung Hsieh <chh@google.com>2022-02-09 15:38:45 -0800
commit4f4d365aa598e933879081f852df9b32c2c979ee (patch)
tree73a0620f13ec9163ce80318e5d817aa6203b21c6 /sensors/common/default/2.X/Sensor.cpp
parent8b389e11236f9e2ded7f988555d77f4be7631707 (diff)
Fix cert-dcl16-c warnings
Bug: 120614316 Test: make tidy-hardware-interfaces_subset Change-Id: I6bbeddb9990e4771155ec7d49a68f0e161789030
Diffstat (limited to 'sensors/common/default/2.X/Sensor.cpp')
-rw-r--r--sensors/common/default/2.X/Sensor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sensors/common/default/2.X/Sensor.cpp b/sensors/common/default/2.X/Sensor.cpp
index 23c98032d1..fd701fd399 100644
--- a/sensors/common/default/2.X/Sensor.cpp
+++ b/sensors/common/default/2.X/Sensor.cpp
@@ -59,10 +59,10 @@ const SensorInfo& Sensor::getSensorInfo() const {
}
void Sensor::batch(int64_t samplingPeriodNs) {
- if (samplingPeriodNs < mSensorInfo.minDelay * 1000ll) {
- samplingPeriodNs = mSensorInfo.minDelay * 1000ll;
- } else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000ll) {
- samplingPeriodNs = mSensorInfo.maxDelay * 1000ll;
+ if (samplingPeriodNs < mSensorInfo.minDelay * 1000LL) {
+ samplingPeriodNs = mSensorInfo.minDelay * 1000LL;
+ } else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000LL) {
+ samplingPeriodNs = mSensorInfo.maxDelay * 1000LL;
}
if (mSamplingPeriodNs != samplingPeriodNs) {