Skip to content

Commit

Permalink
lzo: use get/put_unaligned_* helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Harrison <[email protected]>
Acked-by: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hharrison authored and torvalds committed Jul 25, 2008
1 parent 8b5ac31 commit 545e400
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/lzo/lzo1x_decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
t += 31 + *ip++;
}
m_pos = op - 1;
m_pos -= le16_to_cpu(get_unaligned(
(const unsigned short *)ip)) >> 2;
m_pos -= get_unaligned_le16(ip) >> 2;
ip += 2;
} else if (t >= 16) {
m_pos = op;
Expand All @@ -157,8 +156,7 @@ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
}
t += 7 + *ip++;
}
m_pos -= le16_to_cpu(get_unaligned(
(const unsigned short *)ip)) >> 2;
m_pos -= get_unaligned_le16(ip) >> 2;
ip += 2;
if (m_pos == op)
goto eof_found;
Expand Down

0 comments on commit 545e400

Please sign in to comment.