From: Francis Dupont Date: Thu, 21 May 2020 10:05:49 +0000 (+0200) Subject: [#1147] Addressed comments X-Git-Tag: Kea-1.7.9~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff3d1fbb960372ab9c554fa137f0365d054b914f;p=thirdparty%2Fkea.git [#1147] Addressed comments --- diff --git a/src/bin/dhcp4/client_handler.cc b/src/bin/dhcp4/client_handler.cc index 4d68679523..e91dc8fc31 100644 --- a/src/bin/dhcp4/client_handler.cc +++ b/src/bin/dhcp4/client_handler.cc @@ -85,7 +85,7 @@ ClientHandler::lookup(const DuidPtr& duid) { } auto it = clients_client_id_.find(duid->getDuid()); if (it == clients_client_id_.end()) { - return (0); + return (ClientPtr()); } return (*it); } @@ -101,7 +101,7 @@ ClientHandler::lookup(const HWAddrPtr& hwaddr) { auto key = boost::make_tuple(hwaddr->htype_, hwaddr->hwaddr_); auto it = clients_hwaddr_.find(key); if (it == clients_hwaddr_.end()) { - return (0); + return (ClientPtr()); } return (*it); } diff --git a/src/bin/dhcp4/client_handler.h b/src/bin/dhcp4/client_handler.h index 5a29074c40..236f2551f3 100644 --- a/src/bin/dhcp4/client_handler.h +++ b/src/bin/dhcp4/client_handler.h @@ -51,7 +51,7 @@ public: /// /// Lookup the client: /// - if not found insert the client in the clients map and return true - /// - if found, if has a continuation put it in the holder, + /// - if found, if has a continuation put it in the holder, /// and return false /// /// @param query The query from the client. diff --git a/src/bin/dhcp6/client_handler.cc b/src/bin/dhcp6/client_handler.cc index f7c323a960..38518627e1 100644 --- a/src/bin/dhcp6/client_handler.cc +++ b/src/bin/dhcp6/client_handler.cc @@ -52,7 +52,7 @@ ClientHandler::lookup(const DuidPtr& duid) { } auto it = clients_.find(duid->getDuid()); if (it == clients_.end()) { - return (0); + return (ClientPtr()); } return (*it); } diff --git a/src/bin/dhcp6/client_handler.h b/src/bin/dhcp6/client_handler.h index b7a4a2783d..1f99255f8a 100644 --- a/src/bin/dhcp6/client_handler.h +++ b/src/bin/dhcp6/client_handler.h @@ -49,7 +49,7 @@ public: /// /// Lookup the client: /// - if not found insert the client in the clients map and return true - /// - if found, if has a continuation put it in the holder, + /// - if found, if has a continuation put it in the holder, /// and return false /// /// @param query The query from the client.