mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge remote-tracking branch 'tor-github/pr/466'
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
o Code simplification and refactoring:
|
||||
- Remove unnecessarily unsafe code from the rust macro cstr!. Closes
|
||||
ticket 28077.
|
||||
@@ -105,11 +105,7 @@ macro_rules! cstr {
|
||||
($($bytes:expr),*) => (
|
||||
::std::ffi::CStr::from_bytes_with_nul(
|
||||
concat!($($bytes),*, "\0").as_bytes()
|
||||
).unwrap_or(
|
||||
unsafe{
|
||||
::std::ffi::CStr::from_bytes_with_nul_unchecked(b"\0")
|
||||
}
|
||||
)
|
||||
).unwrap_or_default()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user