Code cosmetics: reduce the amount of cppcheck warnings

This commit is contained in:
Felipe Zimmerle
2015-08-12 15:22:00 -03:00
parent 21400ba454
commit d5fe21ce3c
24 changed files with 49 additions and 56 deletions

View File

@@ -80,10 +80,9 @@ IpTree::~IpTree() {
bool IpTree::addFromBuffer(std::istream *ss, std::string *error) {
char *error_msg = NULL;
int res = 0;
for (std::string line; std::getline(*ss, line); ) {
res = ip_tree_from_param(line.c_str(), &m_tree, &error_msg);
int res = ip_tree_from_param(line.c_str(), &m_tree, &error_msg);
if (res != 0) {
if (error_msg != NULL) {
error->assign(error_msg);