Fix cert-dcl16-c warnings
Bug: 120614316
Test: make tidy-hardware-interfaces-sensors-aidl_subset
Change-Id: Ia9f5a9153b1591623aff0df4e185f445762bcbaf
diff --git a/sensors/aidl/default/Sensor.cpp b/sensors/aidl/default/Sensor.cpp
index 50d8841..62193d6 100644
--- a/sensors/aidl/default/Sensor.cpp
+++ b/sensors/aidl/default/Sensor.cpp
@@ -52,10 +52,10 @@
}
void Sensor::batch(int64_t samplingPeriodNs) {
- if (samplingPeriodNs < mSensorInfo.minDelayUs * 1000ll) {
- samplingPeriodNs = mSensorInfo.minDelayUs * 1000ll;
- } else if (samplingPeriodNs > mSensorInfo.maxDelayUs * 1000ll) {
- samplingPeriodNs = mSensorInfo.maxDelayUs * 1000ll;
+ if (samplingPeriodNs < mSensorInfo.minDelayUs * 1000LL) {
+ samplingPeriodNs = mSensorInfo.minDelayUs * 1000LL;
+ } else if (samplingPeriodNs > mSensorInfo.maxDelayUs * 1000LL) {
+ samplingPeriodNs = mSensorInfo.maxDelayUs * 1000LL;
}
if (mSamplingPeriodNs != samplingPeriodNs) {