Simplify code by using per_read_length() instead of reimplementing it.

This commit is contained in:
Pawel Jakub Dawidek 2012-02-07 11:15:32 +01:00
parent 4117e71a79
commit 2ee9cc5e18
1 changed files with 1 additions and 10 deletions

View File

@ -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;
}