diff options
author | 2018-07-17 16:16:24 -0700 | |
---|---|---|
committer | 2018-10-26 17:19:18 -0700 | |
commit | 954cf64098907f1dfba4f064a24ca6de09a8e611 (patch) | |
tree | 8dc38a7d74201bc6088063aee863a70351df63f4 /cmds/installd/installd.cpp | |
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
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r-- | cmds/installd/installd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); } } |