Commit 2c28b62a authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

wintrust/tests: Simplify the code and improve consistency by removing unneeded function typedefs.

parent 9012d4e7
...@@ -286,9 +286,6 @@ static void test_LoadFunctionPointers(void) ...@@ -286,9 +286,6 @@ static void test_LoadFunctionPointers(void)
ok(ret, "WintrustLoadFunctionPointers failed: %d\n", GetLastError()); ok(ret, "WintrustLoadFunctionPointers failed: %d\n", GetLastError());
} }
typedef void (WINAPI *WintrustGetRegPolicyFlagsFunc)(DWORD *);
typedef BOOL (WINAPI *WintrustSetRegPolicyFlagsFunc)(DWORD);
static void test_RegPolicyFlags(void) static void test_RegPolicyFlags(void)
{ {
/* Default state value 0x00023c00, which is /* Default state value 0x00023c00, which is
...@@ -302,17 +299,15 @@ static void test_RegPolicyFlags(void) ...@@ -302,17 +299,15 @@ static void test_RegPolicyFlags(void)
"Software\\Microsoft\\Windows\\CurrentVersion\\Wintrust\\" "Software\\Microsoft\\Windows\\CurrentVersion\\Wintrust\\"
"Trust Providers\\Software Publishing"; "Trust Providers\\Software Publishing";
static const CHAR State[] = "State"; static const CHAR State[] = "State";
WintrustGetRegPolicyFlagsFunc pGetFlags; void (WINAPI *pGetFlags)(DWORD *);
WintrustSetRegPolicyFlagsFunc pSetFlags; BOOL (WINAPI *pSetFlags)(DWORD);
HKEY key; HKEY key;
LONG r; LONG r;
DWORD flags1, flags2, flags3, size; DWORD flags1, flags2, flags3, size;
BOOL ret; BOOL ret;
pGetFlags = (WintrustGetRegPolicyFlagsFunc)GetProcAddress(hWintrust, pGetFlags = (void*)GetProcAddress(hWintrust, "WintrustGetRegPolicyFlags");
"WintrustGetRegPolicyFlags"); pSetFlags = (void*)GetProcAddress(hWintrust, "WintrustSetRegPolicyFlags");
pSetFlags = (WintrustSetRegPolicyFlagsFunc)GetProcAddress(hWintrust,
"WintrustSetRegPolicyFlags");
if (!pGetFlags || !pSetFlags) if (!pGetFlags || !pSetFlags)
skip("Policy flags functions not present\n"); skip("Policy flags functions not present\n");
......
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