]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Update emptiness checks to be more efficient (cppcheck)
authorMukund Sivaraman <muks@isc.org>
Fri, 1 Nov 2013 05:01:01 +0000 (10:31 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 1 Nov 2013 13:07:41 +0000 (18:37 +0530)
Reviewed by Thomas Markwalder on Jabber.

src/hooks/dhcp/user_chk/subnet_select_co.cc

index 31fbd6fe0d8b1b74df524240fb091bd3d56c67de..3e08f13bdf51f0c594e380cfab3bfaedecf9e2a1 100644 (file)
@@ -121,7 +121,7 @@ int subnet4_select(CalloutHandle& handle) {
         // Get subnet collection. If it's empty just bail nothing to do.
         const isc::dhcp::Subnet4Collection *subnets = NULL;
         handle.getArgument("subnet4collection", subnets);
-        if (subnets->size() == 0) {
+        if (subnets->empty()) {
             return 0;
         }
 
@@ -186,7 +186,7 @@ int subnet6_select(CalloutHandle& handle) {
         // Get subnet collection. If it's empty just bail nothing to do.
         const isc::dhcp::Subnet6Collection *subnets = NULL;
         handle.getArgument("subnet6collection", subnets);
-        if (subnets->size() == 0) {
+        if (subnets->empty()) {
             return 0;
         }