!66 fix codex warnings

Merge pull request !66 from Gymee/codex
This commit is contained in:
openharmony_ci 2021-09-16 10:58:25 +00:00 committed by Gitee
commit 957a2687e9

View File

@ -59,12 +59,12 @@ void DnetworkAdapter::Init()
void DnetworkAdapter::OnNodeOnline(NodeBasicInfo* info)
{
HILOGI("OnNodeOnline netwokId = %{public}s", AnonymizeDeviceId(info->networkId).c_str());
if (info == nullptr) {
HILOGE("OnNodeOnline invalid parameter");
return;
}
HILOGI("OnNodeOnline netwokId = %{public}s", AnonymizeDeviceId(info->networkId).c_str());
auto onlineNotifyTask = [info = *info]() {
std::lock_guard<std::mutex> autoLock(listenerSetMutex_);
for (auto& listener : listenerSet_) {
@ -79,12 +79,12 @@ void DnetworkAdapter::OnNodeOnline(NodeBasicInfo* info)
void DnetworkAdapter::OnNodeOffline(NodeBasicInfo* info)
{
HILOGI("OnNodeOffline networkId = %{public}s", AnonymizeDeviceId(info->networkId).c_str());
if (info == nullptr) {
HILOGE("OnNodeOffline invalid parameter");
return;
}
HILOGI("OnNodeOffline networkId = %{public}s", AnonymizeDeviceId(info->networkId).c_str());
auto offlineNotifyTask = [info = *info]() {
std::lock_guard<std::mutex> autoLock(listenerSetMutex_);
for (auto& listener : listenerSet_) {
@ -206,4 +206,4 @@ std::string DnetworkAdapter::AnonymizeDeviceId(const std::string& deviceId)
return anonDeviceId;
}
} // namespace DistributedSchedule
} // namespace OHOS
} // namespace OHOS