]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4551] Addressed comment (use scoped pointers)
authorFrancis Dupont <fdupont@isc.org>
Tue, 23 Aug 2016 10:27:45 +0000 (12:27 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 23 Aug 2016 10:27:45 +0000 (12:27 +0200)
src/lib/dhcp/iface_mgr.cc

index 8afb0d60f11701f7b50ff7aa47fc2b66c5c9fb89..2e34f3068891b0f4d9d13dc939c54eb2dfb214b4 100644 (file)
@@ -880,14 +880,13 @@ IfaceMgr::send(const Pkt4Ptr& pkt) {
 }
 
 
-boost::shared_ptr<Pkt4>
-IfaceMgr::receive4(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */) {
+Pkt4Ptr IfaceMgr::receive4(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */) {
     // Sanity check for microsecond timeout.
     if (timeout_usec >= 1000000) {
         isc_throw(BadValue, "fractional timeout must be shorter than"
                   " one million microseconds");
     }
-    boost::shared_ptr<SocketInfo> candidate;
+    boost::scoped_ptr<SocketInfo> candidate;
     IfacePtr iface;
     fd_set sockets;
     int maxfd = 0;
@@ -997,7 +996,7 @@ Pkt6Ptr IfaceMgr::receive6(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */
                   " one million microseconds");
     }
 
-    boost::shared_ptr<SocketInfo> candidate;
+    boost::scoped_ptr<SocketInfo> candidate;
     fd_set sockets;
     int maxfd = 0;