Browse Source

[master] Update emptiness checks to be more efficient (cppcheck)

Reviewed by Thomas Markwalder on Jabber.
Mukund Sivaraman 11 years ago
parent
commit
e4475a2cd9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/hooks/dhcp/user_chk/subnet_select_co.cc

+ 2 - 2
src/hooks/dhcp/user_chk/subnet_select_co.cc

@@ -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;
         }