Reducing scope of variable
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Fri, 30 Sep 2011 01:02:54 +0000 (22:02 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Fri, 30 Sep 2011 01:02:54 +0000 (22:02 -0300)
src/config/option/hostdownlimitoption.cpp

index 81c9c3a..000608d 100644 (file)
@@ -57,10 +57,9 @@ bool HostDownLimitOption::parse(
 )
 {
     // hosts-down-limit
-    int host_down_limit = 0;
     if ( vm.count( get_command_string() ) > 0 )
     {
-        host_down_limit = vm[ get_command_string() ].as<int> ();
+        int host_down_limit = vm[ get_command_string() ].as<int> ();
         configuration->set_hosts_down_limit( host_down_limit );
 
         GlobalLogger.info() << get_command_string() << "="