diff --git a/frameworks/native/ability/native/recovery/app_recovery.cpp b/frameworks/native/ability/native/recovery/app_recovery.cpp index 59ce9ccf6f..1b91aa3cb6 100644 --- a/frameworks/native/ability/native/recovery/app_recovery.cpp +++ b/frameworks/native/ability/native/recovery/app_recovery.cpp @@ -553,11 +553,6 @@ bool AppRecovery::GetMissionIds(std::string path, std::vector &missionI } struct dirent *ptr; while ((ptr = readdir(dir)) != nullptr) { - if (ptr == nullptr) { - TAG_LOGE(AAFwkTag::RECOVERY, "null ptr"); - closedir(dir); - return false; - } if (strcmp(ptr->d_name, ".") == 0 || strcmp(ptr->d_name, "..") == 0) { continue; } else if (ptr->d_type == DT_REG) {