summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/compr_rubin.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/compr_rubin.c')
-rw-r--r--fs/jffs2/compr_rubin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
index cf01f888a4..74577d9c62 100644
--- a/fs/jffs2/compr_rubin.c
+++ b/fs/jffs2/compr_rubin.c
@@ -48,8 +48,8 @@
void rubin_do_decompress(unsigned char *bits, unsigned char *in,
unsigned char *page_out, __u32 destlen)
{
- register char *curr = page_out;
- char *end = page_out + destlen;
+ register char *curr = (char *)page_out;
+ char *end = (char *)(page_out + destlen);
register unsigned long temp;
register unsigned long result;
register unsigned long p;
@@ -85,8 +85,10 @@ void rubin_do_decompress(unsigned char *bits, unsigned char *in,
rec_q <<= 1;
rec_q |= (temp >> (bit++ ^ 7)) & 1;
if (bit > 31) {
+ u32 *p = (u32 *)in;
bit = 0;
- temp = *(++((u32 *) in));
+ temp = *(++p);
+ in = (unsigned char *)p;
}
}
i0 = (bits[i] * p) >> 8;
OpenPOWER on IntegriCloud