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 /libbacktrace/include/backtrace/Backtrace.h | |
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 'libbacktrace/include/backtrace/Backtrace.h')
-rw-r--r-- | libbacktrace/include/backtrace/Backtrace.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbacktrace/include/backtrace/Backtrace.h b/libbacktrace/include/backtrace/Backtrace.h index 735a2f36e..10e790b3d 100644 --- a/libbacktrace/include/backtrace/Backtrace.h +++ b/libbacktrace/include/backtrace/Backtrace.h @@ -122,7 +122,7 @@ class Backtrace { // Tracing a thread in a different process is not supported. // If map is NULL, then create the map and manage it internally. // If map is not NULL, the map is still owned by the caller. - static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = NULL); + static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = nullptr); // Create an offline Backtrace object that can be used to do an unwind without a process // that is still running. By default, information is only cached in the map @@ -145,7 +145,7 @@ class Backtrace { virtual ~Backtrace(); // Get the current stack trace and store in the backtrace_ structure. - virtual bool Unwind(size_t num_ignore_frames, void* context = NULL) = 0; + virtual bool Unwind(size_t num_ignore_frames, void* context = nullptr) = 0; static bool Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, std::vector<backtrace_frame_data_t>* frames, size_t num_ignore_frames, @@ -160,7 +160,7 @@ class Backtrace { // If the string is empty, then no valid function name was found, // or the pc is not in any valid map. virtual std::string GetFunctionName(uint64_t pc, uint64_t* offset, - const backtrace_map_t* map = NULL); + const backtrace_map_t* map = nullptr); // Fill in the map data associated with the given pc. virtual void FillInMap(uint64_t pc, backtrace_map_t* map); @@ -185,7 +185,7 @@ class Backtrace { const backtrace_frame_data_t* GetFrame(size_t frame_num) { if (frame_num >= frames_.size()) { - return NULL; + return nullptr; } return &frames_[frame_num]; } |