]> git.lizzy.rs Git - rust.git/commitdiff
Update library/std/src/sys/unix/thread.rs
authorAlik Aslanyan <Inline0@protonmail.com>
Tue, 27 Apr 2021 18:44:37 +0000 (18:44 +0000)
committerGitHub <noreply@github.com>
Tue, 27 Apr 2021 18:44:37 +0000 (18:44 +0000)
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
library/std/src/sys/unix/thread.rs

index 0cdea58ca9fdc3b14ed5e7f6ac6a4dc70c853113..40a634924f2d73d7aab2f5be44af54fc08015a8a 100644 (file)
@@ -156,7 +156,7 @@ pub fn set_name(name: &CStr) {
                 zx_thread_self(),
                 ZX_PROP_NAME,
                 name.as_ptr() as *const libc::c_void,
-                libc::strlen(name.as_ptr()),
+                name.to_bytes().len(),
             );
         }
     }