]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Avoid EXPECT_EQ(true/false, ...) for EXPECT_TRUE/FALSE
authorFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:35:35 +0000 (00:35 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:35:35 +0000 (00:35 +0200)
src/hooks/dhcp/lease_cmds/lease_cmds.cc
src/hooks/dhcp/lease_cmds/tests/lease_cmds_unittest.cc

index 863294428f0576658d2a7aeb7343f8e1912ba1b6..745b74b15ab12d63981a4df4ce63db68764a5282 100644 (file)
@@ -205,7 +205,9 @@ public:
 
 int
 LeaseCmdsImpl::leaseAddHandler(CalloutHandle& handle) {
-    bool v4;
+    // Arbitrary defaulting to DHCPv4 or with other words extractCommand
+    // below is not expected to throw...
+    bool v4 = true;
     string txt = "malformed command";
     try {
         extractCommand(handle);
index 30cdd0da2e062758e2e4efed716ae619ed0d6c58..97aee68c51f9cbe970b523060dc3cbbe82b36310 100644 (file)
@@ -590,8 +590,8 @@ TEST_F(LeaseCmdsTest, Lease4Add) {
     ASSERT_TRUE(l->hwaddr_);
     EXPECT_EQ("1a:1b:1c:1d:1e:1f", l->hwaddr_->toText(false));
     EXPECT_EQ(3, l->valid_lft_); // taken from subnet configuration
-    EXPECT_EQ(false, l->fqdn_fwd_);
-    EXPECT_EQ(false, l->fqdn_rev_);
+    EXPECT_FALSE(l->fqdn_fwd_);
+    EXPECT_FALSE(l->fqdn_rev_);
     EXPECT_EQ("", l->hostname_);
 
     // Test execution is fast. The cltt should be set to now. In some rare