[compiler-rt] r173795 - ASan: fix lint
Alexey Samsonov
samsonov at google.com
Tue Jan 29 04:08:12 PST 2013
Author: samsonov
Date: Tue Jan 29 06:08:12 2013
New Revision: 173795
URL: http://llvm.org/viewvc/llvm-project?rev=173795&view=rev
Log:
ASan: fix lint
Modified:
compiler-rt/trunk/lib/asan/tests/asan_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=173795&r1=173794&r2=173795&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Tue Jan 29 06:08:12 2013
@@ -394,19 +394,19 @@ TEST(AddressSanitizer, ReallocTest) {
TEST(AddressSanitizer, ZeroSizeMallocTest) {
// Test that malloc(0) and similar functions don't return NULL.
void *ptr = Ident(malloc(0));
- EXPECT_FALSE(0 == ptr);
+ EXPECT_TRUE(NULL != ptr);
free(ptr);
#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__)
int pm_res = posix_memalign(&ptr, 1<<20, 0);
EXPECT_EQ(0, pm_res);
- EXPECT_FALSE(0 == ptr);
+ EXPECT_TRUE(NULL != ptr);
free(ptr);
#endif
- int *int_ptr = new int [0];
+ int *int_ptr = new int[0];
int *int_ptr2 = new int[0];
- EXPECT_FALSE(0 == int_ptr);
- EXPECT_FALSE(0 == int_ptr2);
- EXPECT_FALSE(int_ptr == int_ptr2);
+ EXPECT_TRUE(NULL != int_ptr);
+ EXPECT_TRUE(NULL != int_ptr2);
+ EXPECT_NE(int_ptr, int_ptr2);
delete[] int_ptr;
delete[] int_ptr2;
}
More information about the llvm-commits
mailing list