From 32bc0fcf69dfccb3726fe572833a38b01179580e Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Thu, 2 Aug 2018 17:31:13 -0700 Subject: Modernize codebase by replacing NULL with nullptr Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I5b4123bc6709641315120a191e36cc57541349b2 --- tests/async_safe_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/async_safe_test.cpp') 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); -- cgit v1.2.3