Remove unused variables
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:47:42 +0000 (10:47 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 17 Oct 2011 08:47:42 +0000 (10:47 +0200)
src/ipfunc.cpp

index 7c917ec..95866f4 100644 (file)
@@ -56,24 +56,23 @@ void IP_RANGE::swap(IP_RANGE& other)
 void IP_RANGE::load(const std::string& ip)
 {
     string::size_type delim_pos;
-    struct in_addr ia_ip1, ia_ip2;
-        
+
     if ((delim_pos=ip.find('/')) != string::npos ||
         (delim_pos=ip.find('-')) != string::npos)
     {
         if (delim_pos+1 >= ip.size())
             throw runtime_error("invalid IP given: "+ip);
-        
+
         if (ip.at(delim_pos) == '/')
             t=NETWORK;
         else
             t=RANGE;
-            
+
         load(t,ip.substr(0,delim_pos),ip.substr(delim_pos+1));
     }
     else
     {
-        load(IP,ip,"");        
+        load(IP,ip,"");
     }
 }
 
@@ -143,10 +142,8 @@ void IP_RANGE::load(type t, const std::string& ip, const std::string& mask_or_en
 
 void IP_RANGE::load(type t, unsigned int ip, unsigned int mask_or_end)
 {
-    struct in_addr ia_ip1, ia_ip2;
-
     this->t=t;
-        
+
     if (t==IP)
     {
         this->ip=ip;
@@ -157,10 +154,10 @@ void IP_RANGE::load(type t, unsigned int ip, unsigned int mask_or_end)
     {
         this->ip=ip;
         this->mask=mask_or_end;
-        
+
         // make sure ip is really the network address
         this->ip=(this->ip & this->mask);
-        
+
         // calculate end of the network (=broadcast addr)
         this->end=((this->mask ^ 0xFFFFFFFF) | this->ip);
     }
@@ -168,7 +165,7 @@ void IP_RANGE::load(type t, unsigned int ip, unsigned int mask_or_end)
     {
         this->ip=ip;
         this->end=mask_or_end;
-        
+
         // Automatically turn IP if IP & end are swapped
         if (turn_ip(this->ip) > turn_ip(this->end)) {
             unsigned int tmp = this->ip;