diff options
author | Yi Kong <yikong@google.com> | 2018-08-02 17:31:13 -0700 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2018-08-02 18:09:44 -0700 |
commit | 32bc0fcf69dfccb3726fe572833a38b01179580e (patch) | |
tree | abca656f500087493e0997d5cf38cbcc9ec98eb8 /tests/async_safe_test.cpp | |
parent | 65f82092a17518080178ff7004cc6db362ebfbcd (diff) |
Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5b4123bc6709641315120a191e36cc57541349b2
Diffstat (limited to 'tests/async_safe_test.cpp')
-rw-r--r-- | tests/async_safe_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/async_safe_test.cpp b/tests/async_safe_test.cpp index e71ba7a83..4940e3af7 100644 --- a/tests/async_safe_test.cpp +++ b/tests/async_safe_test.cpp @@ -36,7 +36,7 @@ TEST(async_safe_log, smoke) { async_safe_format_buffer(buf, sizeof(buf), "a%sb", "01234"); EXPECT_STREQ("a01234b", buf); - char* s = NULL; + char* s = nullptr; async_safe_format_buffer(buf, sizeof(buf), "a%sb", s); EXPECT_STREQ("a(null)b", buf); @@ -97,7 +97,7 @@ TEST(async_safe_log, smoke) { async_safe_format_buffer(buf, sizeof(buf), "a%03d:%d:%02dz", 5, 5, 5); EXPECT_STREQ("a005:5:05z", buf); - void* p = NULL; + void* p = nullptr; async_safe_format_buffer(buf, sizeof(buf), "a%d,%pz", 5, p); EXPECT_STREQ("a5,0x0z", buf); |