From ff3d1fbb960372ab9c554fa137f0365d054b914f Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Thu, 21 May 2020 12:05:49 +0200 Subject: [PATCH] [#1147] Addressed comments --- src/bin/dhcp4/client_handler.cc | 4 ++-- src/bin/dhcp4/client_handler.h | 2 +- src/bin/dhcp6/client_handler.cc | 2 +- src/bin/dhcp6/client_handler.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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.