Lines Matching defs:content
107 char *content = nullptr;
110 ret = LoaderJsonFile(content, path);
116 if (content == nullptr) {
117 DATA_STORAGE_LOGE("ParserUtil::content is nullptr!");
121 cJSON *root = cJSON_Parse(content);
122 free(content);
123 content = nullptr;
232 char *content = nullptr;
233 int ret = LoaderJsonFile(content, path);
238 if (content == nullptr) {
239 DATA_STORAGE_LOGE("ParserUtil::content is nullptr!");
243 cJSON *root = cJSON_Parse(content);
244 free(content);
245 content = nullptr;
337 char *content = nullptr;
344 ret = parser.LoaderJsonFile(content, path);
350 if (content == nullptr) {
351 DATA_STORAGE_LOGE("ParserUtil::content is nullptr!");
355 free(content);
358 cJSON *root = cJSON_Parse(content);
359 free(content);
360 content = nullptr;
431 char *content = nullptr;
437 ret = LoaderJsonFile(content, path);
443 if (content == nullptr) {
444 DATA_STORAGE_LOGE("ParserUtil::content is nullptr!");
448 free(content);
451 cJSON *root = cJSON_Parse(content);
452 free(content);
453 content = nullptr;
506 int ParserUtil::LoaderJsonFile(char *&content, const char *path) const
537 content = static_cast<char *>(malloc(len + 1));
538 if (content == nullptr) {
539 DATA_STORAGE_LOGE("ParserUtil::LoaderJsonFile malloc content fail!");
543 if (memset_s(content, len + 1, 0, len + 1) != EOK) {
545 free(content);
546 content = nullptr;
550 size_t ret_read = fread(content, 1, len, f);
553 free(content);
554 content = nullptr;