]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
Compilation fix: usual static_cast<X*>(NULL)
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 10 Oct 2012 18:42:46 +0000 (20:42 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 10 Oct 2012 18:42:46 +0000 (20:42 +0200)
Sunstudio is unhappy with plain NULL inside EXPECT_EQ and thinks it is
int. This makes it think otherwise.

src/lib/datasrc/tests/memory/zone_table_unittest.cc

index 9cf1b3420c9162d26c1b16b33492a7ffe03d4080..401d43431b49cd2068b157e43fcddf0b46204024 100644 (file)
@@ -101,9 +101,9 @@ TEST_F(ZoneTableTest, addZone) {
                                                            zname1,
                                                            holder1.release()));
     EXPECT_EQ(result::SUCCESS, result1.code);
-    EXPECT_EQ(NULL, result1.zone_data);
+    EXPECT_EQ(static_cast<const ZoneData*>(NULL), result1.zone_data);
     // It got released by it
-    EXPECT_EQ(NULL, holder1.get());
+    EXPECT_EQ(static_cast<const ZoneData*>(NULL), holder1.get());
 
     // Duplicate add doesn't replace the existing data.
     SegmentObjectHolder<ZoneData, RRClass> holder2(
@@ -115,7 +115,7 @@ TEST_F(ZoneTableTest, addZone) {
     // The old one gets out
     EXPECT_EQ(data1, result2.zone_data);
     // It releases this one even when we replace the old zone
-    EXPECT_EQ(NULL, holder2.get());
+    EXPECT_EQ(static_cast<const ZoneData*>(NULL), holder2.get());
     // We need to release the old one manually
     ZoneData::destroy(mem_sgmt_, result2.zone_data, zclass_);