diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 0d58ddd1b..e83d4ceae 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -389,9 +389,9 @@ NetworkController::ResultCode SqliteNetworkController::doNetworkConfigRequest(co allowedEtherTypes.push_back(et); } std::sort(allowedEtherTypes.begin(),allowedEtherTypes.end()); - for(std::vector::iterator end = std::unique(allowedEtherTypes.begin(),allowedEtherTypes.end()) ; end != allowedEtherTypes.end() ; allowedEtherTypes.pop_back()); + std::vector::iterator end = std::unique(allowedEtherTypes.begin(),allowedEtherTypes.end()); std::string allowedEtherTypesCsv; - for(std::vector::const_iterator i(allowedEtherTypes.begin());i!=allowedEtherTypes.end();++i) { + for(std::vector::const_iterator i(allowedEtherTypes.begin());i!=end;++i) { if (allowedEtherTypesCsv.length()) allowedEtherTypesCsv.push_back(','); char tmp[16];