Fix a bunch of variable shadowing issues from LGTM

This commit is contained in:
Tim Wojtulewicz 2022-11-02 15:54:51 -07:00
parent f8eb2d9241
commit e8dbfc1cb0
10 changed files with 28 additions and 27 deletions

View file

@ -207,9 +207,9 @@ Value* SQLite::EntryToVal(sqlite3_stmt* st, const threading::Field* field, int p
{
const char* text = (const char*)sqlite3_column_text(st, pos);
std::string s(text, sqlite3_column_bytes(st, pos));
int pos = s.find('/');
int width = atoi(s.substr(pos + 1).c_str());
std::string addr = s.substr(0, pos);
size_t slash_pos = s.find('/');
int width = atoi(s.substr(slash_pos + 1).c_str());
std::string addr = s.substr(0, slash_pos);
val->val.subnet_val.prefix = io->ParseAddr(addr);
val->val.subnet_val.length = width;