Commit 9659d197 authored by Max Kellermann's avatar Max Kellermann

lib/upnp/Init: use if with initalizer

parent 50d35c96
......@@ -35,9 +35,7 @@ static unsigned upnp_ref;
static void
DoInit(const char* iface)
{
auto code = UpnpInit2(iface, 0);
if (code != UPNP_E_SUCCESS)
if (auto code = UpnpInit2(iface, 0); code != UPNP_E_SUCCESS)
throw FormatRuntimeError("UpnpInit() failed: %s",
UpnpGetErrorMessage(code));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment