diff options
author | Fedor917 <cryscript@gmail.com> | 2016-11-10 15:53:00 +0700 |
---|---|---|
committer | Fedor917 <cryscript@gmail.com> | 2016-11-10 15:53:00 +0700 |
commit | f7102b858dc849cc94255bc96f95b880dfd93452 (patch) | |
tree | 3e6164b0b02bb62f7093ddc44bbbaebaf44aacf8 /gps/utils/LocThread.cpp | |
parent | cc834f0c4bb0ce51baddc42d11935438bf63394a (diff) |
Initialising brunch based on davidevinavil device tree (CM14.0 branch)
Diffstat (limited to 'gps/utils/LocThread.cpp')
-rw-r--r-- | gps/utils/LocThread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gps/utils/LocThread.cpp b/gps/utils/LocThread.cpp index 19bf101..685841e 100644 --- a/gps/utils/LocThread.cpp +++ b/gps/utils/LocThread.cpp @@ -29,6 +29,7 @@ #include <LocThread.h> #include <string.h> #include <pthread.h> +#include <platform_lib_macros.h> class LocThreadDelegate { LocRunnable* mRunnable; @@ -84,7 +85,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 |