Browse Source

[3177] Pkt6Ptr is now assigned a value during initialization.

Tomek Mrugalski 11 years ago
parent
commit
6b33de4bea
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/bin/dhcp6/tests/wireshark.cc

+ 1 - 2
src/bin/dhcp6/tests/wireshark.cc

@@ -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);