lib/upnp/Init: use if with initalizer
This commit is contained in:
parent
50d35c9677
commit
9659d19718
|
@ -35,9 +35,7 @@ static unsigned upnp_ref;
|
||||||
static void
|
static void
|
||||||
DoInit(const char* iface)
|
DoInit(const char* iface)
|
||||||
{
|
{
|
||||||
|
if (auto code = UpnpInit2(iface, 0); code != UPNP_E_SUCCESS)
|
||||||
auto code = UpnpInit2(iface, 0);
|
|
||||||
if (code != UPNP_E_SUCCESS)
|
|
||||||
throw FormatRuntimeError("UpnpInit() failed: %s",
|
throw FormatRuntimeError("UpnpInit() failed: %s",
|
||||||
UpnpGetErrorMessage(code));
|
UpnpGetErrorMessage(code));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue