From: Mukund Sivaraman Date: Fri, 1 Nov 2013 05:01:01 +0000 (+0530) Subject: [master] Update emptiness checks to be more efficient (cppcheck) X-Git-Tag: bind10-1.2.0beta1-release~102^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4475a2cd90aa4247482b1a4b96ec3dac21b802b;p=thirdparty%2Fkea.git [master] Update emptiness checks to be more efficient (cppcheck) Reviewed by Thomas Markwalder on Jabber. --- diff --git a/src/hooks/dhcp/user_chk/subnet_select_co.cc b/src/hooks/dhcp/user_chk/subnet_select_co.cc index 31fbd6fe0d..3e08f13bdf 100644 --- a/src/hooks/dhcp/user_chk/subnet_select_co.cc +++ b/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; }