mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations * Replaced memset with array initializer * Replaced ZeroMemory with array initializer
This commit is contained in:
committed by
Pascal Nowack
parent
57d2a27980
commit
43c5289928
@@ -107,7 +107,7 @@ int wf_dxgi_getDuplication(wfInfo* wfi)
|
||||
{
|
||||
HRESULT status;
|
||||
UINT dTop, i = 0;
|
||||
DXGI_OUTPUT_DESC desc;
|
||||
DXGI_OUTPUT_DESC desc = { 0 };
|
||||
IDXGIOutput* pOutput;
|
||||
IDXGIDevice* DxgiDevice = NULL;
|
||||
IDXGIAdapter* DxgiAdapter = NULL;
|
||||
@@ -132,7 +132,6 @@ int wf_dxgi_getDuplication(wfInfo* wfi)
|
||||
return 1;
|
||||
}
|
||||
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
pOutput = NULL;
|
||||
|
||||
while (DxgiAdapter->lpVtbl->EnumOutputs(DxgiAdapter, i, &pOutput) != DXGI_ERROR_NOT_FOUND)
|
||||
|
||||
@@ -65,10 +65,11 @@ BOOL wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
|
||||
|
||||
BOOL wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
|
||||
{
|
||||
INPUT mouse_event;
|
||||
INPUT mouse_event = { 0 };
|
||||
float width, height;
|
||||
WINPR_UNUSED(input);
|
||||
ZeroMemory(&mouse_event, sizeof(INPUT));
|
||||
|
||||
WINPR_ASSERT(input);
|
||||
mouse_event.type = INPUT_MOUSE;
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL)
|
||||
@@ -142,8 +143,7 @@ BOOL wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT1
|
||||
{
|
||||
if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2))
|
||||
{
|
||||
INPUT mouse_event;
|
||||
ZeroMemory(&mouse_event, sizeof(INPUT));
|
||||
INPUT mouse_event = { 0 };
|
||||
mouse_event.type = INPUT_MOUSE;
|
||||
|
||||
if (flags & PTR_FLAGS_MOVE)
|
||||
|
||||
Reference in New Issue
Block a user