mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: code style cleanup
This commit is contained in:
parent
04c6f689cc
commit
930c9907ce
|
@ -2084,6 +2084,7 @@ BOOL update_recv_order(rdpUpdate* update, STREAM* s)
|
|||
|
||||
if (stream_get_left(s) < 1)
|
||||
return FALSE;
|
||||
|
||||
stream_read_BYTE(s, controlFlags); /* controlFlags (1 byte) */
|
||||
|
||||
if (!(controlFlags & ORDER_STANDARD))
|
||||
|
|
|
@ -46,6 +46,7 @@ BOOL update_recv_orders(rdpUpdate* update, STREAM* s)
|
|||
|
||||
if (stream_get_left(s) < 6)
|
||||
return FALSE;
|
||||
|
||||
stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
|
||||
stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */
|
||||
stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */
|
||||
|
@ -64,6 +65,7 @@ BOOL update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data)
|
|||
{
|
||||
if (stream_get_left(s) < 18)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, bitmap_data->destLeft);
|
||||
stream_read_UINT16(s, bitmap_data->destTop);
|
||||
stream_read_UINT16(s, bitmap_data->destRight);
|
||||
|
@ -103,8 +105,10 @@ BOOL update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data)
|
|||
BOOL update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_update)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (stream_get_left(s) < 2)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, bitmap_update->number); /* numberRectangles (2 bytes) */
|
||||
|
||||
if (bitmap_update->number > bitmap_update->count)
|
||||
|
@ -138,6 +142,7 @@ BOOL update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u
|
|||
|
||||
if (stream_get_left(s) < 6)
|
||||
return FALSE;
|
||||
|
||||
stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
|
||||
stream_read_UINT32(s, palette_update->number); /* numberColors (4 bytes), must be set to 256 */
|
||||
|
||||
|
@ -173,8 +178,10 @@ BOOL update_read_play_sound(STREAM* s, PLAY_SOUND_UPDATE* play_sound)
|
|||
{
|
||||
if (stream_get_left(s) < 8)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT32(s, play_sound->duration); /* duration (4 bytes) */
|
||||
stream_read_UINT32(s, play_sound->frequency); /* frequency (4 bytes) */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -182,6 +189,7 @@ BOOL update_recv_play_sound(rdpUpdate* update, STREAM* s)
|
|||
{
|
||||
if (!update_read_play_sound(s, &update->play_sound))
|
||||
return FALSE;
|
||||
|
||||
IFCALL(update->PlaySound, update->context, &update->play_sound);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -190,6 +198,7 @@ BOOL update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_po
|
|||
{
|
||||
if (stream_get_left(s) < 4)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, pointer_position->xPos); /* xPos (2 bytes) */
|
||||
stream_read_UINT16(s, pointer_position->yPos); /* yPos (2 bytes) */
|
||||
return TRUE;
|
||||
|
@ -199,6 +208,7 @@ BOOL update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system
|
|||
{
|
||||
if (stream_get_left(s) < 4)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT32(s, pointer_system->type); /* systemPointerType (4 bytes) */
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -252,6 +262,7 @@ BOOL update_read_pointer_new(STREAM* s, POINTER_NEW_UPDATE* pointer_new)
|
|||
{
|
||||
if (stream_get_left(s) < 2)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
|
||||
return update_read_pointer_color(s, &pointer_new->colorPtrAttr); /* colorPtrAttr */
|
||||
}
|
||||
|
@ -260,6 +271,7 @@ BOOL update_read_pointer_cached(STREAM* s, POINTER_CACHED_UPDATE* pointer_cached
|
|||
{
|
||||
if (stream_get_left(s) < 2)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -272,6 +284,7 @@ BOOL update_recv_pointer(rdpUpdate* update, STREAM* s)
|
|||
|
||||
if (stream_get_left(s) < 2 + 2)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, messageType); /* messageType (2 bytes) */
|
||||
stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
|
||||
|
||||
|
@ -320,6 +333,7 @@ BOOL update_recv(rdpUpdate* update, STREAM* s)
|
|||
|
||||
if (stream_get_left(s) < 2)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT16(s, updateType); /* updateType (2 bytes) */
|
||||
|
||||
//printf("%s Update Data PDU\n", UPDATE_TYPE_STRINGS[updateType]);
|
||||
|
|
Loading…
Reference in New Issue