aboutsummaryrefslogtreecommitdiff
path: root/gps/utils/LocThread.cpp
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-10-17 09:31:12 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-10-17 11:53:26 +0530
commitbaa3641d5f8e64288f45432d6e4989701dbbcc0f (patch)
tree1ba8efafae76794db4d0853462f04c71d1f2e3e6 /gps/utils/LocThread.cpp
parent360bc96adec406327820363cd5f79d3d0edbddf7 (diff)
msm8996-common: Import newer GPS stack from xiaomi_msm8996-common
Change-Id: I5afe78048c4af3648b2d267d71a58b63b9decbc9
Diffstat (limited to 'gps/utils/LocThread.cpp')
-rw-r--r--gps/utils/LocThread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gps/utils/LocThread.cpp b/gps/utils/LocThread.cpp
index c1052cb..568a6bb 100644
--- a/gps/utils/LocThread.cpp
+++ b/gps/utils/LocThread.cpp
@@ -85,8 +85,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator,
if (mThandle) {
// set thread name
char lname[16];
- int len = (sizeof(lname)>sizeof(threadName)) ?
- (sizeof(threadName) -1):(sizeof(lname) - 1);
+ int len = (sizeof(lname) > (strlen(threadName) + 1)) ?
+ (strlen(threadName)):(sizeof(lname) - 1);
memcpy(lname, threadName, len);
lname[len] = 0;
// set the thread name here