summaryrefslogtreecommitdiff
path: root/utils/LocThread.cpp
diff options
context:
space:
mode:
authorAshish Dhiman <dhiman@codeaurora.org>2016-02-10 16:15:03 +0530
committerAshish Dhiman <dhiman@codeaurora.org>2016-02-10 16:15:03 +0530
commitfff5a01dfe63004f4b74c7fe99ceb432d46c894d (patch)
treed3263d186138a08b8303171260fd013ee0a3977a /utils/LocThread.cpp
parentf96e5dca060e07f9bf6d259c13dc432ef68487e6 (diff)
downloadgps-fff5a01dfe63004f4b74c7fe99ceb432d46c894d.tar.gz
fix for compiler warnings
Change-Id: I838bfa2c66e77381be483c65b2b3bd68008a25b1 CRs-Fixed: 974489
Diffstat (limited to 'utils/LocThread.cpp')
-rw-r--r--utils/LocThread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/LocThread.cpp b/utils/LocThread.cpp
index 19bf101..5c34034 100644
--- a/utils/LocThread.cpp
+++ b/utils/LocThread.cpp
@@ -84,7 +84,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator,
if (mThandle) {
// set thread name
char lname[16];
- int len = sizeof(lname) - 1;
+ int len = (sizeof(lname)>sizeof(threadName)) ?
+ (sizeof(threadName) -1):(sizeof(lname) - 1);
memcpy(lname, threadName, len);
lname[len] = 0;
// set the thread name here