summaryrefslogtreecommitdiff
path: root/Source/Core/Common/UPnP.cpp
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-08-07 11:34:08 -0700
committerMichael M <mchtly@gmail.com>2017-08-13 18:50:52 -0700
commit7ce9f1f984b4941dc953981ae0cdeab28f0a8efc (patch)
treeccfb614ec0bb0535277b33eece0dbf5a24d664a6 /Source/Core/Common/UPnP.cpp
parentb5d070b0cfd4c956046ee68952b9ce1986ddce49 (diff)
UPnP: remove unneeded vector in InitUPnP()
Diffstat (limited to 'Source/Core/Common/UPnP.cpp')
-rw-r--r--Source/Core/Common/UPnP.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Core/Common/UPnP.cpp b/Source/Core/Common/UPnP.cpp
index 411beb45f0..767f49c418 100644
--- a/Source/Core/Common/UPnP.cpp
+++ b/Source/Core/Common/UPnP.cpp
@@ -31,7 +31,6 @@ static bool InitUPnP()
static bool s_inited = false;
static bool s_error = false;
- std::vector<UPNPDev*> igds;
int upnperror = 0;
// Don't init if already inited
@@ -64,12 +63,9 @@ static bool InitUPnP()
// Look for the IGD
for (UPNPDev* dev = devlist.get(); dev; dev = dev->pNext)
{
- if (std::strstr(dev->st, "InternetGatewayDevice"))
- igds.push_back(dev);
- }
+ if (!std::strstr(dev->st, "InternetGatewayDevice"))
+ continue;
- for (const UPNPDev* dev : igds)
- {
int desc_xml_size = 0;
std::unique_ptr<char, decltype(&std::free)> desc_xml(nullptr, std::free);
int statusCode = 200;