diff --git a/interfaces/kits/cj/src/common_event_manager_ffi.cpp b/interfaces/kits/cj/src/common_event_manager_ffi.cpp index fcd692c75b4105b3782d84f3f250924962fde5ba..febb27ff4fdf6c1324274ea416fc6a78a0e1e3fd 100755 --- a/interfaces/kits/cj/src/common_event_manager_ffi.cpp +++ b/interfaces/kits/cj/src/common_event_manager_ffi.cpp @@ -158,11 +158,9 @@ namespace OHOS::CommonEventManager { } ret.data = MallocCString(GetSubscriberData(subscriber)); if (ret.data == nullptr) { - LOGE("CJ_GetData failed: out of memory.") - ret.code = ERR_NO_MEMORY; - } else { - ret.code = NO_ERROR; + LOGW("ret.data is nullptr.") } + ret.code = NO_ERROR; return ret; } @@ -309,7 +307,7 @@ namespace OHOS::CommonEventManager { int32_t CJ_FinishCommonEvent(int64_t id) { - int32_t errorCode = ERR_CES_FAILED; + int32_t errorCode = NO_ERROR; auto instance = FFIData::GetData(id); if (!instance) { LOGE("SubscriberManager instance not exist %{public}" PRId64, id);