[U-Boot] [PATCH] zlib: Fix integer cast of pointer

Simon Glass sjg at chromium.org
Tue Oct 18 00:55:05 CEST 2011


Fix to cast an integer to a pointer using uintptr_t.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
 lib/zlib/inffast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/zlib/inffast.c b/lib/zlib/inffast.c
index 4834b0c..38f2f90 100644
--- a/lib/zlib/inffast.c
+++ b/lib/zlib/inffast.c
@@ -105,7 +105,7 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
          * overflow detected, limit strm->avail_in to the
          * max. possible size and recalculate last
          */
-        strm->avail_in = 0xffffffff - (unsigned int)in;
+	strm->avail_in = 0xffffffff - (uintptr_t)in;
         last = in + (strm->avail_in - 5);
     }
     out = strm->next_out - OFF;
-- 
1.7.3.1



More information about the U-Boot mailing list