clang-tidy: Fix absolute value calculation
Replaced the use of `abs` with `labs` for calculating the absolute value
of `timeStamp.tm_gmtoff` to resolve the `-Wabsolute-value` warning. This
ensures the correct handling of long values for timezone offsets.
'''
src/zlib_file.cpp:53:19: [0m[0;1;31m
error: [0m[1mabsolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
'''
Tested: Build verified
Change-Id: I5d79449d9995ef28427f34a6f89c581fca31cdbc
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/src/zlib_file.cpp b/src/zlib_file.cpp
index 73695b0..bcabd44 100644
--- a/src/zlib_file.cpp
+++ b/src/zlib_file.cpp
@@ -50,7 +50,7 @@
timeStamp.tm_year + 1900, timeStamp.tm_mon + 1,
timeStamp.tm_mday, timeStamp.tm_hour, timeStamp.tm_min,
timeStamp.tm_sec, timeStamp.tm_gmtoff / (60 * 60),
- abs(timeStamp.tm_gmtoff % (60 * 60)) / 60);
+ labs(timeStamp.tm_gmtoff % (60 * 60)) / 60);
if (rc <= 0)
{