From 2972b5cb18c644a769473441acd734be3df2cf9e Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Tue, 7 Feb 2012 12:28:05 +0200 Subject: [PATCH 1/1] Unused variable removed --- include/stg/user_ips.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/stg/user_ips.h b/include/stg/user_ips.h index 8fada63b..a29e2812 100644 --- a/include/stg/user_ips.h +++ b/include/stg/user_ips.h @@ -202,7 +202,6 @@ USER_IPS ips; char * paddr; IP_MASK im; std::vector ipMask; -std::string err; if (ipsStr.empty()) { return ips; @@ -236,7 +235,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) strIp = strtok(str, "/"); if (strIp == NULL) { - err = "Incorrect IP address " + ipsStr; return ips; } strMask = strtok(NULL, "/"); @@ -244,7 +242,6 @@ for (unsigned int i = 0; i < ipMask.size(); i++) im.ip = inet_addr(strIp); if (im.ip == INADDR_NONE) { - err = "Incorrect IP address: " + std::string(strIp); return ips; } @@ -254,20 +251,17 @@ for (unsigned int i = 0; i < ipMask.size(); i++) int m = 0; if (str2x(strMask, m) != 0) { - err = "Incorrect mask: " + std::string(strMask); return ips; } im.mask = m; if (im.mask > 32) { - err = "Incorrect mask: " + std::string(strMask); return ips; } if ((im.ip & ips.CalcMask(im.mask)) != im.ip) { - err = "Address does'n match mask: " + std::string(strIp) + "/" + std::string(strMask); return ips; } } -- 2.44.2