已合并
fix code warning #12525
zhangjianwei创建于 27 天前
fix code warning #12525
已合并
共 2 个文件变更+2-0
| @@ -406,6 +406,7 @@ void AuthNegotiateChannel::OnConnOpenFailed(uint32_t requestId, int32_t reason) | |||
| 406 | 406 | ||
| 407 | void AuthNegotiateChannel::AddAuthConnection(const LnnEventBasicInfo *info) | 407 | void AuthNegotiateChannel::AddAuthConnection(const LnnEventBasicInfo *info) |
| 408 | { | 408 | { |
| 409 | + CONN_CHECK_AND_RETURN_LOGE(info != nullptr, CONN_WIFI_DIRECT, "info is null"); | ||
S | |||
| 409 | CONN_LOGI(CONN_WIFI_DIRECT, "start refresh auth connection"); | 410 | CONN_LOGI(CONN_WIFI_DIRECT, "start refresh auth connection"); |
| 410 | LnnNotifyRawEnhanceP2pEvent *lnnNotifyRawEnhanceP2pEvent = | 411 | LnnNotifyRawEnhanceP2pEvent *lnnNotifyRawEnhanceP2pEvent = |
| 411 | reinterpret_cast<LnnNotifyRawEnhanceP2pEvent *>(const_cast<LnnEventBasicInfo *>(info)); | 412 | reinterpret_cast<LnnNotifyRawEnhanceP2pEvent *>(const_cast<LnnEventBasicInfo *>(info)); |
| @@ -722,6 +722,7 @@ int32_t WifiDirectUtils::GetDeviceType() | |||
| 722 | 722 | ||
| 723 | int32_t WifiDirectUtils::GetMetaType(const char *networkId) | 723 | int32_t WifiDirectUtils::GetMetaType(const char *networkId) |
| 724 | { | 724 | { |
| 725 | + CONN_CHECK_AND_RETURN_RET_LOGE(networkId != nullptr, SOFTBUS_INVALID_PARAM, CONN_WIFI_DIRECT, "networkId is null"); | ||
| 725 | int32_t metaType = 0; | 726 | int32_t metaType = 0; |
| 726 | auto ret = DBinderSoftbusServer::GetInstance().LnnGetRemoteNumInfo(networkId, NUM_KEY_META_TYPE, &metaType); | 727 | auto ret = DBinderSoftbusServer::GetInstance().LnnGetRemoteNumInfo(networkId, NUM_KEY_META_TYPE, &metaType); |
| 727 | CONN_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, metaType, CONN_WIFI_DIRECT, "get remote meta type fail"); | 728 | CONN_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, metaType, CONN_WIFI_DIRECT, "get remote meta type fail"); |
LGTM