diff options
| author | Michael M <mchtly@gmail.com> | 2017-08-07 11:34:53 -0700 |
|---|---|---|
| committer | Michael M <mchtly@gmail.com> | 2017-08-13 18:50:52 -0700 |
| commit | 0e51082bbba2d1d1722b496580e50acb7e3040b3 (patch) | |
| tree | 8efa81042743b8a31b2c763b3c03768a61071035 /Source/Core/Common/UPnP.cpp | |
| parent | 7ce9f1f984b4941dc953981ae0cdeab28f0a8efc (diff) | |
UPnP: move variable declaration to where it's used
Diffstat (limited to 'Source/Core/Common/UPnP.cpp')
| -rw-r--r-- | Source/Core/Common/UPnP.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/Common/UPnP.cpp b/Source/Core/Common/UPnP.cpp index 767f49c418..2ca9fc9e54 100644 --- a/Source/Core/Common/UPnP.cpp +++ b/Source/Core/Common/UPnP.cpp @@ -31,8 +31,6 @@ static bool InitUPnP() static bool s_inited = false; static bool s_error = false; - int upnperror = 0; - // Don't init if already inited if (s_inited) return true; @@ -45,6 +43,7 @@ static bool InitUPnP() std::memset(&s_data, 0, sizeof(IGDdatas)); // Find all UPnP devices + int upnperror = 0; std::unique_ptr<UPNPDev, decltype(&freeUPNPDevlist)> devlist(nullptr, freeUPNPDevlist); #if MINIUPNPC_API_VERSION >= 14 devlist.reset(upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &upnperror)); |
