]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2432] Minimize code
authorMukund Sivaraman <muks@isc.org>
Mon, 7 Jan 2013 09:02:35 +0000 (14:32 +0530)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 7 Jan 2013 23:10:45 +0000 (15:10 -0800)
src/lib/dns/tests/rrset_collection_unittest.cc

index a19362322b3e3095ce0bdd30547f771828132a37..49b7606b14b59a12d18ddccc833c0e441a4ec96b 100644 (file)
@@ -125,19 +125,16 @@ doAddAndRemove(RRsetCollection& collection, const RRClass& rrclass) {
     }, isc::InvalidParameter);
 
     // Remove foo.example.org/A, which should pass
-    bool exists = collection.removeRRset(Name("foo.example.org"),
-                                         rrclass, RRType::A());
-    EXPECT_TRUE(exists);
-
+    EXPECT_TRUE(collection.removeRRset(Name("foo.example.org"),
+                                       rrclass, RRType::A()));
     // foo.example.org/A should not exist now
     rrset_found = collection.find(Name("foo.example.org"), rrclass,
                                   RRType::A());
     EXPECT_FALSE(rrset_found);
 
     // Removing foo.example.org/A should fail now
-    exists = collection.removeRRset(Name("foo.example.org"),
-                                    rrclass, RRType::A());
-    EXPECT_FALSE(exists);
+    EXPECT_FALSE(collection.removeRRset(Name("foo.example.org"),
+                                        rrclass, RRType::A()));
 }
 
 TEST_F(RRsetCollectionTest, addAndRemove) {