mirror of
https://gitee.com/openharmony/applications_settings
synced 2024-11-22 22:09:58 +00:00
fix ffi code
Change-Id: I96bbf588a5cc588ddb1f8df79eeb44299b55c11c Signed-off-by: dinghong <dinghong10@huawei.com>
This commit is contained in:
parent
c41cb6d287
commit
de1a3ba5c3
@ -52,11 +52,10 @@ char* TransformFromString(std::string str, int32_t* ret)
|
||||
|
||||
bool CheckoutStatus(int32_t status, int32_t* result)
|
||||
{
|
||||
*result = 0;
|
||||
if (status >= 0) {
|
||||
*result = 0;
|
||||
return true;
|
||||
}
|
||||
*result = status;
|
||||
if (status == PERMISSION_DENIED_CODE) {
|
||||
*result = PERMISSION_EXCEPTION_CODE;
|
||||
}
|
||||
@ -265,6 +264,9 @@ char* Settings::GetValue(
|
||||
int64_t len = info.value.size();
|
||||
if (len <= 0) {
|
||||
CheckoutStatus(info.status, ret);
|
||||
if (*ret == 0) {
|
||||
return TransformFromString(value, ret);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return TransformFromString(info.value, ret);
|
||||
|
Loading…
Reference in New Issue
Block a user