Merge branch 'master' of https://gitee.com/baiyingwei_2009/sensors_sensor into new_master

Signed-off-by: baiwei <baiwei39@huawei.com>
Change-Id: I6a404e12f9e19368bd283e68579b6eea57f30885
This commit is contained in:
baiwei 2023-10-09 08:46:04 +00:00
commit 9104c4259c

View File

@ -163,7 +163,7 @@ impl StreamBuffer {
}
}
fn get_error_status_remark(&self) -> *const c_char {
// SAFETY: Creating a new C-compatible string will never fail,
// Creating a new C-compatible string will never fail,
// because the supplied bytes always contain greater than 0.
let s: CString = match self.rw_error_status {
ErrorStatus::Ok => CString::new("OK").unwrap_or_default(),