mirror of https://github.com/FreeRDP/FreeRDP
Simplify code by using per_read_length() instead of reimplementing it.
This commit is contained in:
parent
4117e71a79
commit
2ee9cc5e18
|
@ -53,7 +53,6 @@ uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
|
|||
{
|
||||
uint8 header;
|
||||
uint16 length;
|
||||
uint8 t;
|
||||
|
||||
stream_read_uint8(s, header);
|
||||
|
||||
|
@ -63,15 +62,7 @@ uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
|
|||
fastpath->numberEvents = (header & 0x3C) >> 2;
|
||||
}
|
||||
|
||||
stream_read_uint8(s, length); /* length1 */
|
||||
/* If most significant bit is not set, length2 is not presented. */
|
||||
if ((length & 0x80))
|
||||
{
|
||||
length &= 0x7F;
|
||||
length <<= 8;
|
||||
stream_read_uint8(s, t);
|
||||
length += t;
|
||||
}
|
||||
per_read_length(s, &length);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue