From 8cb5bbfcb274afdb50fed3769c73da3fd2c4b55f Mon Sep 17 00:00:00 2001 From: Kees Bos Date: Fri, 26 Jun 2015 21:17:44 +0200 Subject: [PATCH] No use to update allowedEtherTypes when we'll throw it away --- controller/SqliteNetworkController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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];