Fixed argument checks, formatting.

This commit is contained in:
Armin Novak 2017-03-03 13:44:07 +01:00
parent 99c45405cb
commit 88b6ff00d9
3 changed files with 9 additions and 11 deletions

View File

@ -1177,7 +1177,7 @@ static BOOL update_message_WindowCreate(rdpContext* context, WINDOW_ORDER_INFO*
WINDOW_ORDER_INFO* wParam;
WINDOW_STATE_ORDER* lParam;
if (!context || !context->update || !windowState)
if (!context || !context->update || !orderInfo || !windowState)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1205,7 +1205,7 @@ static BOOL update_message_WindowUpdate(rdpContext* context, WINDOW_ORDER_INFO*
WINDOW_ORDER_INFO* wParam;
WINDOW_STATE_ORDER* lParam;
if (!context || !context->update || !windowState)
if (!context || !context->update || !orderInfo || !windowState)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1233,7 +1233,7 @@ static BOOL update_message_WindowIcon(rdpContext* context, WINDOW_ORDER_INFO* or
WINDOW_ORDER_INFO* wParam;
WINDOW_ICON_ORDER* lParam;
if (!context || !context->update || !windowIcon)
if (!context || !context->update || !orderInfo || !windowIcon)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1303,7 +1303,7 @@ static BOOL update_message_WindowCachedIcon(rdpContext* context, WINDOW_ORDER_IN
WINDOW_ORDER_INFO* wParam;
WINDOW_CACHED_ICON_ORDER* lParam;
if (!context || !context->update || !windowCachedIcon)
if (!context || !context->update || !orderInfo || !windowCachedIcon)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1348,7 +1348,7 @@ static BOOL update_message_NotifyIconCreate(rdpContext* context, WINDOW_ORDER_IN
WINDOW_ORDER_INFO* wParam;
NOTIFY_ICON_STATE_ORDER* lParam;
if (!context || !context->update || !notifyIconState)
if (!context || !context->update || !orderInfo || !notifyIconState)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1376,7 +1376,7 @@ static BOOL update_message_NotifyIconUpdate(rdpContext* context, WINDOW_ORDER_IN
WINDOW_ORDER_INFO* wParam;
NOTIFY_ICON_STATE_ORDER* lParam;
if (!context || !context->update || !notifyIconState)
if (!context || !context->update || !orderInfo || !notifyIconState)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));
@ -1421,7 +1421,7 @@ static BOOL update_message_MonitoredDesktop(rdpContext* context, WINDOW_ORDER_IN
WINDOW_ORDER_INFO* wParam;
MONITORED_DESKTOP_ORDER* lParam;
if (!context || !context->update || !monitoredDesktop)
if (!context || !context->update || !orderInfo || !monitoredDesktop)
return FALSE;
wParam = (WINDOW_ORDER_INFO*) malloc(sizeof(WINDOW_ORDER_INFO));

View File

@ -1493,8 +1493,6 @@ BOOL nla_send(rdpNla* nla)
/* [2] authInfo (OCTET STRING) */
if (auth_info_length > 0)
{
length = auth_info_length;
if (ber_write_sequence_octet_string(s, 2, nla->authInfo.pvBuffer,
nla->authInfo.cbBuffer) != auth_info_length)
return FALSE;

View File

@ -268,7 +268,7 @@ int rdtk_nine_patch_set_image(rdtkNinePatch* ninePatch, wImage* image)
}
}
pixel = (UINT32*) & ((BYTE*) pixel)[scanline];
pixel = (UINT32*) &((BYTE*) pixel)[scanline];
}
ninePatch->scaleTop = beg - 1;
@ -323,7 +323,7 @@ int rdtk_nine_patch_set_image(rdtkNinePatch* ninePatch, wImage* image)
}
}
pixel = (UINT32*) & ((BYTE*) pixel)[scanline];
pixel = (UINT32*) &((BYTE*) pixel)[scanline];
}
ninePatch->fillTop = beg - 1;