diff options
| author | Yi Kong <yikong@google.com> | 2018-07-16 18:11:34 -0700 |
|---|---|---|
| committer | Yi Kong <yikong@google.com> | 2018-07-16 18:11:34 -0700 |
| commit | e1731a4f2e05f1abb4a45602067708851eaf1e14 (patch) | |
| tree | 339c0ce3d3de7d6f5e0fb9bdada9b6210d1d470f /libutils/Threads.cpp | |
| parent | 895acebe946e34d2626716c5c4d7d7f2cc28c39d (diff) | |
| download | system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.gz system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.bz2 system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.zip | |
[libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
Diffstat (limited to 'libutils/Threads.cpp')
| -rw-r--r-- | libutils/Threads.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp index 7d7f0e283..43ec6c139 100644 --- a/libutils/Threads.cpp +++ b/libutils/Threads.cpp @@ -163,7 +163,7 @@ int androidCreateRawThreadEtc(android_thread_func_t entryFunction, // Note that *threadID is directly available to the parent only, as it is // assigned after the child starts. Use memory barrier / lock if the child // or other threads also need access. - if (threadId != NULL) { + if (threadId != nullptr) { *threadId = (android_thread_id_t)thread; // XXX: this is not portable } return 1; @@ -768,7 +768,7 @@ int Thread::_threadLoop(void* user) strong.clear(); // And immediately, re-acquire a strong reference for the next loop strong = weak.promote(); - } while(strong != 0); + } while(strong != nullptr); return 0; } |
