]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
Compilation fix for NetBSD and gcc on Solaris 10
authorTomek Mrugalski <tomasz@isc.org>
Mon, 17 Oct 2011 18:17:34 +0000 (20:17 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 17 Oct 2011 18:17:34 +0000 (20:17 +0200)
src/lib/dhcp/libdhcp.cc
src/lib/dhcp/tests/option6_ia_unittest.cc

index 019367f60d51c2f13da074234ffb87a1a10c1706..8e6314e3b93b8a390de081b284144faadf86d8a4 100644 (file)
@@ -101,8 +101,8 @@ LibDHCP::packOptions6(boost::shared_array<uint8_t> data,
         }
     }
     catch (const Exception& e) {
-        cout << "Packet build failed." << endl;
-        return (-1);
+        cout << "Packet build failed (Option build failed)." << endl;
+        throw;
     }
     return (offset);
 }
index ab949deb5de81adcbcc9f6c00bd6f3cfffd1ea2b..ac4127ac1b398de56cdefcb66ac1d4e56cda5275 100644 (file)
@@ -248,7 +248,8 @@ TEST_F(Option6IATest, suboptions_unpack) {
 
     EXPECT_EQ(0xcafe, subopt->getType());
     EXPECT_EQ(4, subopt->len());
-    EXPECT_EQ(NULL, subopt->getData());
+    // there should be no data at all
+    EXPECT_EQ(static_cast<void*>(NULL), subopt->getData());
 
     subopt = ia->getOption(1); // get option 1
     ASSERT_FALSE(subopt); // should be NULL