Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c21b37f6449a3d799c7e75e978391674ee207600
Commit:     c21b37f6449a3d799c7e75e978391674ee207600
Parent:     3968cb49ab01588cbf6896951780a1e411a0ec38
Author:     Richard Purdie <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 00:37:42 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 15:39:37 2007 -0700

    lzo: add some missing casts
    
    Add some casts to the LZO compression algorithm after they were removed
    during cleanup and shouldn't have been.
    
    Signed-off-by: Richard Purdie <[EMAIL PROTECTED]>
    Cc: Edward Shishkin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 lib/lzo/lzo1x_compress.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c
index c935f00..a604099 100644
--- a/lib/lzo/lzo1x_compress.c
+++ b/lib/lzo/lzo1x_compress.c
@@ -32,13 +32,13 @@ _lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
        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;
@@ -51,7 +51,7 @@ _lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
                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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to