mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this macro
This commit is contained in:
@@ -39,7 +39,7 @@ UINT ios_cliprdr_send_client_format_list(CliprdrClientContext *cliprdr)
|
||||
UINT32 *pFormatIds;
|
||||
const char *formatName;
|
||||
CLIPRDR_FORMAT *formats;
|
||||
CLIPRDR_FORMAT_LIST formatList = { 0 };
|
||||
CLIPRDR_FORMAT_LIST formatList = WINPR_C_ARRAY_INIT;
|
||||
|
||||
if (!cliprdr)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
@@ -91,7 +91,7 @@ static UINT ios_cliprdr_send_client_format_data_request(CliprdrClientContext *cl
|
||||
UINT32 formatId)
|
||||
{
|
||||
UINT rc = ERROR_INVALID_PARAMETER;
|
||||
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest = { 0 };
|
||||
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest = WINPR_C_ARRAY_INIT;
|
||||
mfContext *afc;
|
||||
|
||||
if (!cliprdr)
|
||||
@@ -325,7 +325,7 @@ ios_cliprdr_server_format_data_request(CliprdrClientContext *cliprdr,
|
||||
BYTE *data;
|
||||
UINT32 size;
|
||||
UINT32 formatId;
|
||||
CLIPRDR_FORMAT_DATA_RESPONSE response = { 0 };
|
||||
CLIPRDR_FORMAT_DATA_RESPONSE response = WINPR_C_ARRAY_INIT;
|
||||
mfContext *afc;
|
||||
|
||||
if (!cliprdr || !formatDataRequest || !cliprdr->ClientFormatDataResponse)
|
||||
|
||||
@@ -203,7 +203,7 @@ static BOOL ios_Pointer_SetDefault(rdpContext *context)
|
||||
|
||||
static BOOL ios_register_pointer(rdpGraphics *graphics)
|
||||
{
|
||||
rdpPointer pointer = { 0 };
|
||||
rdpPointer pointer = WINPR_C_ARRAY_INIT;
|
||||
|
||||
if (!graphics)
|
||||
return FALSE;
|
||||
@@ -279,7 +279,7 @@ int ios_run_freerdp(freerdp *instance)
|
||||
{
|
||||
DWORD status;
|
||||
DWORD nCount = 0;
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = WINPR_C_ARRAY_INIT;
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
nCount = freerdp_get_event_handles(instance->context, handles, ARRAYSIZE(handles));
|
||||
|
||||
@@ -46,7 +46,7 @@ NSString *TSXSessionDidFailToConnectNotification = @"TSXSessionDidFailToConnect"
|
||||
|
||||
static BOOL addArgument(int *argc, char ***argv, const char *fmt, ...)
|
||||
{
|
||||
va_list ap = { 0 };
|
||||
va_list ap = WINPR_C_ARRAY_INIT;
|
||||
char *arg = NULL;
|
||||
char **tmp = realloc(*argv, (*argc + 1) * sizeof(char *));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user