Merge "Fix issue with setting of thread name"
This commit is contained in:
commit
63dca90436
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue