mirror of
https://gitee.com/openharmony/security_asset
synced 2024-11-23 07:49:41 +00:00
improve the judge empty codes
Signed-off-by: zhangwenzhi <zhangwenzhi3@huawei.com>
This commit is contained in:
parent
4bd686ae19
commit
a4498c5dad
@ -34,6 +34,7 @@ const MAX_VEC_CAPACITY: u32 = 0x10000;
|
||||
impl_enum_trait! {
|
||||
/// Code used to identify the function to be called.
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Eq, PartialEq)]
|
||||
pub enum IpcCode {
|
||||
/// Code for AddAsset.
|
||||
Add = ipc::FIRST_CALL_TRANSACTION,
|
||||
|
@ -94,7 +94,7 @@ fn on_app_request(code: &IpcCode, param_map: &AssetMap) -> Result<()> {
|
||||
_ => return Err(AssetError::new(ErrCode::BmsError, "[FATAL]Get calling package name failed.".to_string()))
|
||||
}
|
||||
|
||||
if *code == IpcCode::Remove && param_map.len() == 0 {
|
||||
if code == &IpcCode::Remove && param_map.is_empty() {
|
||||
name.truncate(name_len as usize);
|
||||
return remove_all_ext_data(&user_id, &name, &app_index);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user