api: clear up argument evaluation order

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-10-31 15:53:54 +01:00 committed by Simon Rozman
parent 17bd620a36
commit 378e8eec27

View File

@ -138,11 +138,8 @@ VOID __stdcall DeleteAdapter(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int
if (FAILED(CLSIDFromString(Argv[3], &Adapter.CfgInstanceID)))
goto cleanup;
BOOL RebootRequired;
WriteFormatted(
STD_OUTPUT_HANDLE,
L"%1!X! %2!X!",
WintunDeleteAdapter(&Adapter, ForceCloseSessions, &RebootRequired),
RebootRequired);
WINTUN_STATUS Ret = WintunDeleteAdapter(&Adapter, ForceCloseSessions, &RebootRequired);
WriteFormatted(STD_OUTPUT_HANDLE, L"%1!X! %2!X!", Ret, RebootRequired);
cleanup:
Done();