]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] workaround for cppcheck failure: avoid using an 'immediately
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 22 Dec 2011 17:38:26 +0000 (09:38 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 22 Dec 2011 17:38:26 +0000 (09:38 -0800)
destructed scoped object'

src/lib/util/tests/socketsession_unittest.cc

index 95c0dbd33723f164c0d4b94578f41691dc771c1d..b9f266769290a56fa5081e07edccaaccd4c97155 100644 (file)
@@ -816,9 +816,9 @@ TEST_F(ForwardTest, badPop) {
     sock.reset(-1);
     // The passed one should have been closed, too, so we should be able
     // to bind a new socket to the same port.
-    ScopedSocket(createSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP,
-                              getSockAddr("127.0.0.1", TEST_PORT),
-                              false));
+    sock.reset(createSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP,
+                            getSockAddr("127.0.0.1", TEST_PORT),
+                            false));
 }
 
 TEST(SocketSessionTest, badValue) {