From 013da806ec20b62a742aded9a9d2b8131193f30d Mon Sep 17 00:00:00 2001 From: jfhumann Date: Fri, 18 Apr 2014 21:09:44 +0200 Subject: Did some static analysis, fixed some bugs and optimized a lot of code --- src/WebAdmin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/WebAdmin.cpp') diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index cd141f7eb..a3b3cc5be 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -229,10 +229,11 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque } // for itr - Data->m_Form[] // Parse the URL into individual params: - size_t idxQM = a_Request.GetURL().find('?'); + const AString & URL = a_Request.GetURL(); + size_t idxQM = URL.find('?'); if (idxQM != AString::npos) { - cHTTPFormParser URLParams(cHTTPFormParser::fpkURL, a_Request.GetURL().c_str() + idxQM + 1, a_Request.GetURL().length() - idxQM - 1, *Data); + cHTTPFormParser URLParams(cHTTPFormParser::fpkURL, URL.c_str() + idxQM + 1, URL.length() - idxQM - 1, *Data); URLParams.Finish(); for (cHTTPFormParser::const_iterator itr = URLParams.begin(), end = URLParams.end(); itr != end; ++itr) { @@ -388,7 +389,6 @@ AString cWebAdmin::GetDefaultPage(void) { continue; } - AString VersionNum; AppendPrintf(Content, "
  • %s V.%i
  • ", itr->second->GetName().c_str(), itr->second->GetVersion()); } Content += ""; -- cgit v1.2.3