diff options
author | 2018-07-17 16:16:24 -0700 | |
---|---|---|
committer | 2018-10-26 17:19:18 -0700 | |
commit | 954cf64098907f1dfba4f064a24ca6de09a8e611 (patch) | |
tree | 8dc38a7d74201bc6088063aee863a70351df63f4 | |
parent | 8bae3798cb56789e8297ba0b43979014d00b05ba (diff) |
[installd] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
(cherry picked from commit e7bf377d62141c27508b28513e2091a826ad7b15)
Merged-In: I9dc0c1020993ec3c7e95ab552f7620ea2badf742
Change-Id: I1937de4d243e213c36f6f9c3e67380f019c6e61c
-rw-r--r-- | cmds/installd/CacheItem.cpp | 2 | ||||
-rw-r--r-- | cmds/installd/CacheTracker.cpp | 2 | ||||
-rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 36 | ||||
-rw-r--r-- | cmds/installd/dexopt.cpp | 38 | ||||
-rw-r--r-- | cmds/installd/installd.cpp | 6 | ||||
-rw-r--r-- | cmds/installd/utils.cpp | 36 |
6 files changed, 60 insertions, 60 deletions
diff --git a/cmds/installd/CacheItem.cpp b/cmds/installd/CacheItem.cpp index 515f915b8b..e29ff4c248 100644 --- a/cmds/installd/CacheItem.cpp +++ b/cmds/installd/CacheItem.cpp @@ -73,7 +73,7 @@ int CacheItem::purge() { FTS *fts; FTSENT *p; char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { PLOG(WARNING) << "Failed to fts_open " << path; return -1; } diff --git a/cmds/installd/CacheTracker.cpp b/cmds/installd/CacheTracker.cpp index ea0cd9e4e2..a7242c35cf 100644 --- a/cmds/installd/CacheTracker.cpp +++ b/cmds/installd/CacheTracker.cpp @@ -103,7 +103,7 @@ void CacheTracker::loadItemsFrom(const std::string& path) { FTS *fts; FTSENT *p; char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { PLOG(WARNING) << "Failed to fts_open " << path; return; } diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index f5f74bf04f..28ffdf1e31 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -661,7 +661,7 @@ binder::Status InstalldNativeService::fixupAppData(const std::unique_ptr<std::st auto ce_path = create_data_user_ce_path(uuid_, user); auto de_path = create_data_user_de_path(uuid_, user); char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { return error("Failed to fts_open"); } while ((p = fts_read(fts)) != nullptr) { @@ -786,7 +786,7 @@ binder::Status InstalldNativeService::moveCompleteApp(const std::unique_ptr<std: }; LOG(DEBUG) << "Copying " << from << " to " << to; - int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, NULL, false, true); + int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, nullptr, false, true); if (rc != 0) { res = error(rc, "Failed copying " + from + " to " + to); goto fail; @@ -832,7 +832,7 @@ binder::Status InstalldNativeService::moveCompleteApp(const std::unique_ptr<std: argv[7] = (char*) to.c_str(); LOG(DEBUG) << "Copying " << from << " to " << to; - int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, NULL, false, true); + int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, nullptr, false, true); if (rc != 0) { res = error(rc, "Failed copying " + from + " to " + to); goto fail; @@ -845,7 +845,7 @@ binder::Status InstalldNativeService::moveCompleteApp(const std::unique_ptr<std: argv[7] = (char*) to.c_str(); LOG(DEBUG) << "Copying " << from << " to " << to; - int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, NULL, false, true); + int rc = android_fork_execvp(ARRAY_SIZE(argv), argv, nullptr, false, true); if (rc != 0) { res = error(rc, "Failed copying " + from + " to " + to); goto fail; @@ -868,20 +868,20 @@ fail: // Nuke everything we might have already copied { auto to = create_data_app_package_path(to_uuid, data_app_name); - if (delete_dir_contents(to.c_str(), 1, NULL) != 0) { + if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { LOG(WARNING) << "Failed to rollback " << to; } } for (auto user : users) { { auto to = create_data_user_de_package_path(to_uuid, user, package_name); - if (delete_dir_contents(to.c_str(), 1, NULL) != 0) { + if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { LOG(WARNING) << "Failed to rollback " << to; } } { auto to = create_data_user_ce_package_path(to_uuid, user, package_name); - if (delete_dir_contents(to.c_str(), 1, NULL) != 0) { + if (delete_dir_contents(to.c_str(), 1, nullptr) != 0) { LOG(WARNING) << "Failed to rollback " << to; } } @@ -984,10 +984,10 @@ binder::Status InstalldNativeService::freeCache(const std::unique_ptr<std::strin auto media_path = findDataMediaPath(uuid, user) + "/Android/data/"; char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), (char*) media_path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { return error("Failed to fts_open"); } - while ((p = fts_read(fts)) != NULL) { + while ((p = fts_read(fts)) != nullptr) { if (p->fts_info == FTS_D && p->fts_level == 1) { uid_t uid = p->fts_statp->st_uid; if (multiuser_get_app_id(uid) == AID_MEDIA_RW) { @@ -1337,11 +1337,11 @@ static void collectManualExternalStatsForUser(const std::string& path, struct st FTS *fts; FTSENT *p; char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { PLOG(ERROR) << "Failed to fts_open " << path; return; } - while ((p = fts_read(fts)) != NULL) { + while ((p = fts_read(fts)) != nullptr) { p->fts_number = p->fts_parent->fts_number; switch (p->fts_info) { case FTS_D: @@ -1747,10 +1747,10 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std: FTSENT *p; auto path = create_data_media_path(uuid_, userId); char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { return error("Failed to fts_open " + path); } - while ((p = fts_read(fts)) != NULL) { + while ((p = fts_read(fts)) != nullptr) { char* ext; int64_t size = (p->fts_statp->st_blocks * 512); switch (p->fts_info) { @@ -1980,7 +1980,7 @@ binder::Status InstalldNativeService::linkNativeLibraryDirectory( } } else { if (S_ISDIR(libStat.st_mode)) { - if (delete_dir_contents(libsymlink, 1, NULL) < 0) { + if (delete_dir_contents(libsymlink, 1, nullptr) < 0) { res = error("Failed to delete " + _libsymlink); goto out; } @@ -2022,14 +2022,14 @@ out: static void run_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd) { execl(kIdMapPath, kIdMapPath, "--fd", target_apk, overlay_apk, - StringPrintf("%d", idmap_fd).c_str(), (char*)NULL); + StringPrintf("%d", idmap_fd).c_str(), (char*)nullptr); PLOG(ERROR) << "execl (" << kIdMapPath << ") failed"; } static void run_verify_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd) { execl(kIdMapPath, kIdMapPath, "--verify", target_apk, overlay_apk, - StringPrintf("%d", idmap_fd).c_str(), (char*)NULL); + StringPrintf("%d", idmap_fd).c_str(), (char*)nullptr); PLOG(ERROR) << "execl (" << kIdMapPath << ") failed"; } @@ -2080,7 +2080,7 @@ static bool delete_stale_idmap(const char* target_apk, const char* overlay_apk, static int flatten_path(const char *prefix, const char *suffix, const char *overlay_path, char *idmap_path, size_t N) { - if (overlay_path == NULL || idmap_path == NULL) { + if (overlay_path == nullptr || idmap_path == nullptr) { return -1; } const size_t len_overlay_path = strlen(overlay_path); @@ -2421,7 +2421,7 @@ binder::Status InstalldNativeService::installApkVerity(const std::string& filePa std::to_string(shmSize)); } auto data = std::unique_ptr<void, std::function<void (void *)>>( - mmap(NULL, contentSize, PROT_READ, MAP_SHARED, verityInputAshmem.get(), 0), + mmap(nullptr, contentSize, PROT_READ, MAP_SHARED, verityInputAshmem.get(), 0), [contentSize] (void* ptr) { if (ptr != MAP_FAILED) { munmap(ptr, contentSize); diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp index 03a411d849..66dece740a 100644 --- a/cmds/installd/dexopt.cpp +++ b/cmds/installd/dexopt.cpp @@ -190,9 +190,9 @@ static int split_count(const char *str) strlcpy(buf, str, sizeof(buf)); char *pBuf = buf; - while(strtok_r(pBuf, " ", &ctx) != NULL) { + while(strtok_r(pBuf, " ", &ctx) != nullptr) { count++; - pBuf = NULL; + pBuf = nullptr; } return count; @@ -205,9 +205,9 @@ static int split(char *buf, const char **argv) char *tok; char *pBuf = buf; - while((tok = strtok_r(pBuf, " ", &ctx)) != NULL) { + while((tok = strtok_r(pBuf, " ", &ctx)) != nullptr) { argv[count++] = tok; - pBuf = NULL; + pBuf = nullptr; } return count; @@ -216,7 +216,7 @@ static int split(char *buf, const char **argv) static const char* get_location_from_path(const char* path) { static constexpr char kLocationSeparator = '/'; const char *location = strrchr(path, kLocationSeparator); - if (location == NULL) { + if (location == nullptr) { return path; } else { // Skip the separator character. @@ -243,17 +243,17 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd const char* relative_input_file_name = get_location_from_path(input_file_name); char dex2oat_Xms_flag[kPropertyValueMax]; - bool have_dex2oat_Xms_flag = get_property("dalvik.vm.dex2oat-Xms", dex2oat_Xms_flag, NULL) > 0; + bool have_dex2oat_Xms_flag = get_property("dalvik.vm.dex2oat-Xms", dex2oat_Xms_flag, nullptr) > 0; char dex2oat_Xmx_flag[kPropertyValueMax]; - bool have_dex2oat_Xmx_flag = get_property("dalvik.vm.dex2oat-Xmx", dex2oat_Xmx_flag, NULL) > 0; + bool have_dex2oat_Xmx_flag = get_property("dalvik.vm.dex2oat-Xmx", dex2oat_Xmx_flag, nullptr) > 0; char dex2oat_threads_buf[kPropertyValueMax]; bool have_dex2oat_threads_flag = get_property(post_bootcomplete ? "dalvik.vm.dex2oat-threads" : "dalvik.vm.boot-dex2oat-threads", dex2oat_threads_buf, - NULL) > 0; + nullptr) > 0; char dex2oat_threads_arg[kPropertyValueMax + 2]; if (have_dex2oat_threads_flag) { sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf); @@ -263,20 +263,20 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd sprintf(dex2oat_isa_features_key, "dalvik.vm.isa.%s.features", instruction_set); char dex2oat_isa_features[kPropertyValueMax]; bool have_dex2oat_isa_features = get_property(dex2oat_isa_features_key, - dex2oat_isa_features, NULL) > 0; + dex2oat_isa_features, nullptr) > 0; char dex2oat_isa_variant_key[kPropertyKeyMax]; sprintf(dex2oat_isa_variant_key, "dalvik.vm.isa.%s.variant", instruction_set); char dex2oat_isa_variant[kPropertyValueMax]; bool have_dex2oat_isa_variant = get_property(dex2oat_isa_variant_key, - dex2oat_isa_variant, NULL) > 0; + dex2oat_isa_variant, nullptr) > 0; const char *dex2oat_norelocation = "-Xnorelocate"; bool have_dex2oat_relocation_skip_flag = false; char dex2oat_flags[kPropertyValueMax]; int dex2oat_flags_count = get_property("dalvik.vm.dex2oat-flags", - dex2oat_flags, NULL) <= 0 ? 0 : split_count(dex2oat_flags); + dex2oat_flags, nullptr) <= 0 ? 0 : split_count(dex2oat_flags); ALOGV("dalvik.vm.dex2oat-flags=%s\n", dex2oat_flags); // If we are booting without the real /data, don't spend time compiling. @@ -291,14 +291,14 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd char app_image_format[kPropertyValueMax]; char image_format_arg[strlen("--image-format=") + kPropertyValueMax]; bool have_app_image_format = - image_fd >= 0 && get_property("dalvik.vm.appimageformat", app_image_format, NULL) > 0; + image_fd >= 0 && get_property("dalvik.vm.appimageformat", app_image_format, nullptr) > 0; if (have_app_image_format) { sprintf(image_format_arg, "--image-format=%s", app_image_format); } char dex2oat_large_app_threshold[kPropertyValueMax]; bool have_dex2oat_large_app_threshold = - get_property("dalvik.vm.dex2oat-very-large", dex2oat_large_app_threshold, NULL) > 0; + get_property("dalvik.vm.dex2oat-very-large", dex2oat_large_app_threshold, nullptr) > 0; char dex2oat_large_app_threshold_arg[strlen("--very-large-app-threshold=") + kPropertyValueMax]; if (have_dex2oat_large_app_threshold) { sprintf(dex2oat_large_app_threshold_arg, @@ -400,7 +400,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd if (!have_dex2oat_compiler_filter_flag) { char dex2oat_compiler_filter_flag[kPropertyValueMax]; have_dex2oat_compiler_filter_flag = get_property("dalvik.vm.dex2oat-filter", - dex2oat_compiler_filter_flag, NULL) > 0; + dex2oat_compiler_filter_flag, nullptr) > 0; if (have_dex2oat_compiler_filter_flag) { sprintf(dex2oat_compiler_filter_arg, "--compiler-filter=%s", @@ -552,7 +552,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd argv[i++] = compilation_reason_arg.c_str(); } // Do not add after dex2oat_flags, they should override others for debugging. - argv[i] = NULL; + argv[i] = nullptr; execv(dex2oat_bin, (char * const *)argv); PLOG(ERROR) << "execv(" << dex2oat_bin << ") failed"; @@ -792,7 +792,7 @@ static void run_profman(const std::vector<unique_fd>& profile_fds, } // Do not add after dex2oat_flags, they should override others for debugging. - argv[i] = NULL; + argv[i] = nullptr; execv(profman_bin, (char * const *)argv); PLOG(ERROR) << "execv(" << profman_bin << ") failed"; @@ -948,7 +948,7 @@ static void run_profman_dump(const std::vector<unique_fd>& profile_fds, for (const std::string& profman_arg : profman_args) { argv[i++] = profman_arg.c_str(); } - argv[i] = NULL; + argv[i] = nullptr; execv(PROFMAN_BIN, (char * const *)argv); PLOG(ERROR) << "execv(" << PROFMAN_BIN << ") failed"; @@ -1308,7 +1308,7 @@ Dex2oatFileWrapper maybe_open_app_image(const char* out_oat_path, } char app_image_format[kPropertyValueMax]; bool have_app_image_format = - get_property("dalvik.vm.appimageformat", app_image_format, NULL) > 0; + get_property("dalvik.vm.appimageformat", app_image_format, nullptr) > 0; if (!have_app_image_format) { return Dex2oatFileWrapper(); } @@ -1629,7 +1629,7 @@ static void exec_dexoptanalyzer(const std::string& dex_file, int vdex_fd, int oa if (class_loader_context != nullptr) { argv[i++] = class_loader_context_arg.c_str(); } - argv[i] = NULL; + argv[i] = nullptr; execv(dexoptanalyzer_bin, (char * const *)argv); ALOGE("execv(%s) failed: %s\n", dexoptanalyzer_bin, strerror(errno)); diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp index 95ed2fff35..673ff0d513 100644 --- a/cmds/installd/installd.cpp +++ b/cmds/installd/installd.cpp @@ -107,7 +107,7 @@ static int initialize_directories() { DIR *dir; struct dirent *dirent; dir = opendir("/data/user"); - if (dir != NULL) { + if (dir != nullptr) { while ((dirent = readdir(dir))) { const char *name = dirent->d_name; @@ -146,10 +146,10 @@ static int initialize_directories() { closedir(dir); if (access(keychain_added_dir, F_OK) == 0) { - delete_dir_contents(keychain_added_dir, 1, 0); + delete_dir_contents(keychain_added_dir, 1, nullptr); } if (access(keychain_removed_dir, F_OK) == 0) { - delete_dir_contents(keychain_removed_dir, 1, 0); + delete_dir_contents(keychain_removed_dir, 1, nullptr); } } diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp index 8672206d17..6b9cf0d526 100644 --- a/cmds/installd/utils.cpp +++ b/cmds/installd/utils.cpp @@ -310,7 +310,7 @@ std::vector<userid_t> get_known_users(const char* volume_uuid) { std::string path(create_data_path(volume_uuid) + "/" + SECONDARY_USER_PREFIX); DIR* dir = opendir(path.c_str()); - if (dir == NULL) { + if (dir == nullptr) { // Unable to discover other users, but at least return owner PLOG(ERROR) << "Failed to opendir " << path; return users; @@ -340,13 +340,13 @@ int calculate_tree_size(const std::string& path, int64_t* size, FTSENT *p; int64_t matchedSize = 0; char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { if (errno != ENOENT) { PLOG(ERROR) << "Failed to fts_open " << path; } return -1; } - while ((p = fts_read(fts)) != NULL) { + while ((p = fts_read(fts)) != nullptr) { switch (p->fts_info) { case FTS_D: case FTS_DEFAULT: @@ -469,7 +469,7 @@ static int _delete_dir_contents(DIR *d, continue; } subdir = fdopendir(subfd); - if (subdir == NULL) { + if (subdir == nullptr) { ALOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno)); close(subfd); result = -1; @@ -495,11 +495,11 @@ static int _delete_dir_contents(DIR *d, } int delete_dir_contents(const std::string& pathname, bool ignore_if_missing) { - return delete_dir_contents(pathname.c_str(), 0, NULL, ignore_if_missing); + return delete_dir_contents(pathname.c_str(), 0, nullptr, ignore_if_missing); } int delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing) { - return delete_dir_contents(pathname.c_str(), 1, NULL, ignore_if_missing); + return delete_dir_contents(pathname.c_str(), 1, nullptr, ignore_if_missing); } int delete_dir_contents(const char *pathname, @@ -511,7 +511,7 @@ int delete_dir_contents(const char *pathname, DIR *d; d = opendir(pathname); - if (d == NULL) { + if (d == nullptr) { if (ignore_if_missing && (errno == ENOENT)) { return 0; } @@ -540,12 +540,12 @@ int delete_dir_contents_fd(int dfd, const char *name) return -1; } d = fdopendir(fd); - if (d == NULL) { + if (d == nullptr) { ALOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno)); close(fd); return -1; } - res = _delete_dir_contents(d, 0); + res = _delete_dir_contents(d, nullptr); closedir(d); return res; } @@ -573,7 +573,7 @@ static int _copy_dir_files(int sdfd, int ddfd, uid_t owner, gid_t group) } DIR *ds = fdopendir(sdfd); - if (ds == NULL) { + if (ds == nullptr) { ALOGE("Couldn't fdopendir: %s\n", strerror(errno)); return -1; } @@ -619,18 +619,18 @@ int copy_dir_files(const char *srcname, uid_t group) { int res = 0; - DIR *ds = NULL; - DIR *dd = NULL; + DIR *ds = nullptr; + DIR *dd = nullptr; ds = opendir(srcname); - if (ds == NULL) { + if (ds == nullptr) { ALOGE("Couldn't opendir %s: %s\n", srcname, strerror(errno)); return -errno; } mkdir(dstname, 0600); dd = opendir(dstname); - if (dd == NULL) { + if (dd == nullptr) { ALOGE("Couldn't opendir %s: %s\n", dstname, strerror(errno)); closedir(ds); return -errno; @@ -964,11 +964,11 @@ int prepare_app_cache_dir(const std::string& parent, const char* name, mode_t ta FTS *fts; FTSENT *p; char *argv[] = { (char*) path.c_str(), nullptr }; - if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) { + if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, nullptr))) { PLOG(ERROR) << "Failed to fts_open " << path; return -1; } - while ((p = fts_read(fts)) != NULL) { + while ((p = fts_read(fts)) != nullptr) { switch (p->fts_info) { case FTS_DP: if (chmod(p->fts_path, target_mode) != 0) { @@ -1037,7 +1037,7 @@ static bool collect_profiles(DIR* d, } DIR* subdir = fdopendir(subdir_fd); - if (subdir == NULL) { + if (subdir == nullptr) { PLOG(WARNING) << "Could not open dir path " << local_path; result = false; continue; @@ -1055,7 +1055,7 @@ static bool collect_profiles(DIR* d, bool collect_profiles(std::vector<std::string>* profiles_paths) { DIR* d = opendir(android_profiles_dir.c_str()); - if (d == NULL) { + if (d == nullptr) { return false; } else { return collect_profiles(d, android_profiles_dir, profiles_paths); |