fix snprintf using fmt syntax
This commit is contained in:
parent
cf799aab34
commit
76089ac665
@ -31,7 +31,7 @@ struct ThreadImpl {
|
|||||||
#ifdef STAR_SYSTEM_MACOS
|
#ifdef STAR_SYSTEM_MACOS
|
||||||
// ensure the name is under the max allowed
|
// ensure the name is under the max allowed
|
||||||
char tname[MAX_THREAD_NAMELEN];
|
char tname[MAX_THREAD_NAMELEN];
|
||||||
snprintf(tname, sizeof(tname), "{}", ptr->name.utf8Ptr());
|
snprintf(tname, sizeof(tname), "%s", ptr->name.utf8Ptr());
|
||||||
|
|
||||||
pthread_setname_np(tname);
|
pthread_setname_np(tname);
|
||||||
#endif
|
#endif
|
||||||
@ -70,7 +70,7 @@ struct ThreadImpl {
|
|||||||
|
|
||||||
// ensure the name is under the max allowed
|
// ensure the name is under the max allowed
|
||||||
char tname[MAX_THREAD_NAMELEN];
|
char tname[MAX_THREAD_NAMELEN];
|
||||||
snprintf(tname, sizeof(tname), "{}", name.utf8Ptr());
|
snprintf(tname, sizeof(tname), "%s", name.utf8Ptr());
|
||||||
|
|
||||||
#ifdef STAR_SYSTEM_FREEBSD
|
#ifdef STAR_SYSTEM_FREEBSD
|
||||||
pthread_set_name_np(pthread, tname);
|
pthread_set_name_np(pthread, tname);
|
||||||
|
Loading…
Reference in New Issue
Block a user