set_threadname: silence "overlapping src/dest" valgrind warning

This might be a false positive, but the fix does not harm ;)


Origin commit data
------------------
Branch: ni/coolstream
Commit: b36c2b03d6
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-03 (Sun, 03 Jan 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2016-01-03 18:41:52 +01:00
parent 8391df61cd
commit f7f88f9f9d

View File

@@ -7,7 +7,7 @@
inline void set_threadname(const char *name)
{
char threadname[17];
strncpy(threadname, name, sizeof(threadname));
strncpy(threadname, name, 16);
threadname[16] = 0;
prctl (PR_SET_NAME, (unsigned long)threadname);
}