提交 545e4006 编写于 作者: H Harvey Harrison 提交者: Linus Torvalds

lzo: use get/put_unaligned_* helpers

Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
Acked-by: NRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8b5ac31e
...@@ -138,8 +138,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len, ...@@ -138,8 +138,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
t += 31 + *ip++; t += 31 + *ip++;
} }
m_pos = op - 1; m_pos = op - 1;
m_pos -= le16_to_cpu(get_unaligned( m_pos -= get_unaligned_le16(ip) >> 2;
(const unsigned short *)ip)) >> 2;
ip += 2; ip += 2;
} else if (t >= 16) { } else if (t >= 16) {
m_pos = op; m_pos = op;
...@@ -157,8 +156,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len, ...@@ -157,8 +156,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
} }
t += 7 + *ip++; t += 7 + *ip++;
} }
m_pos -= le16_to_cpu(get_unaligned( m_pos -= get_unaligned_le16(ip) >> 2;
(const unsigned short *)ip)) >> 2;
ip += 2; ip += 2;
if (m_pos == op) if (m_pos == op)
goto eof_found; goto eof_found;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册