Fix initialization two locals
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 11 May 2009 12:04:55 +0000 (14:04 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 11 May 2009 12:04:55 +0000 (14:04 +0200)
src/filter_load_balance.cpp

index 1170afb..cc2708f 100644 (file)
@@ -392,7 +392,7 @@ std::string yf::LoadBalance::Impl::find_session_target(unsigned long session_id)
 // cost functions
 unsigned int yf::LoadBalance::Impl::cost(std::string target)
 {
-    unsigned int cost;
+    unsigned int cost = 0;
 
     if (target.size() != 0)
     {
@@ -408,7 +408,7 @@ unsigned int yf::LoadBalance::Impl::cost(std::string target)
 
 unsigned int yf::LoadBalance::Impl::dead(std::string target)
 {
-    unsigned int dead;
+    unsigned int dead = 0;
 
     if (target.size() != 0)
     {