Browse Source

[master] Fix for variable scope reported by cppcheck

Tomek Mrugalski 11 years ago
parent
commit
343252ae26
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/bin/dhcp4/dhcp4_srv.cc

+ 1 - 4
src/bin/dhcp4/dhcp4_srv.cc

@@ -953,12 +953,9 @@ Dhcpv4Srv::processRelease(Pkt4Ptr& release) {
             }
         }
 
-        // Ok, we've passed all checks. Let's release this address.
-        bool success = false; // was the removal operation succeessful?
-
         // Ok, hw and client-id match - let's release the lease.
         if (!skip) {
-            success = LeaseMgrFactory::instance().deleteLease(lease->addr_);
+            bool success = LeaseMgrFactory::instance().deleteLease(lease->addr_);
 
             if (success) {
                 // Release successful - we're done here