fix codex warnings

Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I59a83bec43940bde10146b494a4df1fd69522ace
This commit is contained in:
Gymee 2021-09-16 09:31:16 +08:00
parent 618397620a
commit 1f3de79f80

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