ASan: fix lint
authorAlexey Samsonov <samsonov@google.com>
Tue, 29 Jan 2013 12:08:12 +0000 (12:08 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 29 Jan 2013 12:08:12 +0000 (12:08 +0000)
llvm-svn: 173795

compiler-rt/lib/asan/tests/asan_test.cc

index 092cd8f..66276dd 100644 (file)
@@ -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;
 }