Add some casts to the LZO compression algorithm after they were removed
during cleanup and shouldn't have been.
Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
Cc: Edward Shishkin <edward@namesys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ip += 4;
for (;;) {
- dindex = ((0x21 * DX3(ip, 5, 5, 6)) >> 5) & D_MASK;
+ dindex = ((size_t)(0x21 * DX3(ip, 5, 5, 6)) >> 5) & D_MASK;
m_pos = dict[dindex];
if (m_pos < in)
goto literal;
- if (ip == m_pos || (ip - m_pos) > M4_MAX_OFFSET)
+ if (ip == m_pos || ((size_t)(ip - m_pos) > M4_MAX_OFFSET))
goto literal;
m_off = ip - m_pos;
if (m_pos < in)
goto literal;
- if (ip == m_pos || (ip - m_pos) > M4_MAX_OFFSET)
+ if (ip == m_pos || ((size_t)(ip - m_pos) > M4_MAX_OFFSET))
goto literal;
m_off = ip - m_pos;