codecheck3

Signed-off-by: dengxiaoyu <dengxiaoyu6@huawei.com>
This commit is contained in:
dengxiaoyu 2024-08-05 21:21:58 +08:00
parent efd44053df
commit 2b025380a4

View File

@ -457,6 +457,10 @@ bool GetOsInfoFromDM(const std::string &dmInfoEx, int32_t &osType, std::string &
osType = cJSON_GetObjectItemCaseSensitive(dataJson, PARAM_KEY_OS_TYPE)->valueint;
osVersion = std::string(cJSON_GetObjectItemCaseSensitive(dataJson, PARAM_KEY_OS_VERSION)->valuestring);
if (!cJSON_IsNumber(osType)) {
HILOGE("osType is invalid ");
break;
}
isSuccess = true;
} while (false);