]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3177] Pkt6Ptr is now assigned a value during initialization.
authorTomek Mrugalski <tomasz@isc.org>
Mon, 7 Oct 2013 11:44:03 +0000 (13:44 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 7 Oct 2013 11:44:03 +0000 (13:44 +0200)
src/bin/dhcp6/tests/wireshark.cc

index 2f590300b2afacd6142956930969d868df415025..4e9654812965f70cb7ea98727021388e262b49da 100644 (file)
@@ -50,7 +50,6 @@ void Dhcpv6SrvTest::captureSetDefaultFields(const Pkt6Ptr& pkt) {
 
 // This function returns buffer for very simple Solicit
 Pkt6Ptr Dhcpv6SrvTest::captureSimpleSolicit() {
-    Pkt6Ptr pkt;
     uint8_t data[] = {
         1,  // type 1 = SOLICIT
         0xca, 0xfe, 0x01, // trans-id = 0xcafe01
@@ -64,7 +63,7 @@ Pkt6Ptr Dhcpv6SrvTest::captureSimpleSolicit() {
         0, 0, 0, 0  // T2 = 0
     };
 
-    pkt.reset(new Pkt6(data, sizeof(data)));
+    Pkt6Ptr pkt(new Pkt6(data, sizeof(data)));
     captureSetDefaultFields(pkt);
 
     return (pkt);