From 41c06420b9ff028fd452cec19ac1412be665673f Mon Sep 17 00:00:00 2001 From: "yang.zhang" Date: Wed, 18 May 2016 11:25:47 +0800 Subject: Imported upstream 3.0.8 Change-Id: I8423a2e4bed8a15b862b6b1ab6f6371c92e78b3f --- xdelta3-fgk.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xdelta3-fgk.h') diff --git a/xdelta3-fgk.h b/xdelta3-fgk.h index 81d5e7e..7011500 100644 --- a/xdelta3-fgk.h +++ b/xdelta3-fgk.h @@ -109,7 +109,7 @@ static fgk_stream* fgk_alloc (xd3_stream *stream /*, usize_t alpha static int fgk_init (xd3_stream *stream, fgk_stream *h, int is_encode); -static usize_t fgk_encode_data (fgk_stream *h, +static int fgk_encode_data (fgk_stream *h, usize_t n); static inline fgk_bit fgk_get_encoded_bit (fgk_stream *h); @@ -125,7 +125,7 @@ static int xd3_encode_fgk (xd3_stream *stream, static inline int fgk_decode_bit (fgk_stream *h, fgk_bit b); -static usize_t fgk_decode_data (fgk_stream *h); +static int fgk_decode_data (fgk_stream *h); static void fgk_destroy (xd3_stream *stream, fgk_stream *h); @@ -234,7 +234,7 @@ static void fgk_swap_ptrs(fgk_node **one, fgk_node **two) /* Takes huffman transmitter h and n, the nth elt in the alphabet, and * returns the number of required to encode n. */ -static usize_t fgk_encode_data (fgk_stream* h, usize_t n) +static int fgk_encode_data (fgk_stream* h, usize_t n) { fgk_node *target_ptr = h->alphabet + n; @@ -249,8 +249,8 @@ static usize_t fgk_encode_data (fgk_stream* h, usize_t n) * is not neccesary to encode these bits. */ if (IS_ADAPTIVE && target_ptr->weight == 0) { - usize_t where, shift; - usize_t bits; + unsigned int where, shift; + int bits; where = fgk_find_nth_zero(h, n); shift = 1; @@ -734,7 +734,7 @@ static usize_t fgk_nth_zero (fgk_stream* h, usize_t n) * alphabet otherwise this returns 0, indicating more bits are * required. */ -static usize_t fgk_decode_data (fgk_stream* h) +static int fgk_decode_data (fgk_stream* h) { usize_t elt = (usize_t)(h->decode_ptr - h->alphabet); -- cgit v1.2.3