fix for compiler warnings

Change-Id: I838bfa2c66e77381be483c65b2b3bd68008a25b1
CRs-Fixed: 974489
This commit is contained in:
Ashish Dhiman 2016-02-10 16:15:03 +05:30
parent f96e5dca06
commit fff5a01dfe

View file

@ -84,7 +84,8 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator,
if (mThandle) { if (mThandle) {
// set thread name // set thread name
char lname[16]; char lname[16];
int len = sizeof(lname) - 1; int len = (sizeof(lname)>sizeof(threadName)) ?
(sizeof(threadName) -1):(sizeof(lname) - 1);
memcpy(lname, threadName, len); memcpy(lname, threadName, len);
lname[len] = 0; lname[len] = 0;
// set the thread name here // set the thread name here