aboutsummaryrefslogtreecommitdiff
path: root/gps/utils/LocThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gps/utils/LocThread.cpp')
-rw-r--r--gps/utils/LocThread.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/gps/utils/LocThread.cpp b/gps/utils/LocThread.cpp
index 19bf101..a7fd1c8 100644
--- a/gps/utils/LocThread.cpp
+++ b/gps/utils/LocThread.cpp
@@ -84,9 +84,7 @@ LocThreadDelegate::LocThreadDelegate(LocThread::tCreate creator,
if (mThandle) {
// set thread name
char lname[16];
- int len = sizeof(lname) - 1;
- memcpy(lname, threadName, len);
- lname[len] = 0;
+ strlcpy(lname, threadName, sizeof(lname));
// set the thread name here
pthread_setname_np(mThandle, lname);