]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/decompress_unlz4.c
random32: improvements to prandom_bytes
[karo-tx-linux.git] / lib / decompress_unlz4.c
index 3ad7f3954dfd23b27a87380e75d384f3056d609a..40f66ebe57b77a0566460a2407bdd713d6e0b3fc 100644 (file)
 #define LZ4_DEFAULT_UNCOMPRESSED_CHUNK_SIZE (8 << 20)
 #define ARCHIVE_MAGICNUMBER 0x184C2102
 
-STATIC inline int INIT unlz4(u8 *input, int in_len,
-                               int (*fill) (void *, unsigned int),
-                               int (*flush) (void *, unsigned int),
-                               u8 *output, int *posp,
+STATIC inline int INIT unlz4(u8 *input, long in_len,
+                               long (*fill)(void *, unsigned long),
+                               long (*flush)(void *, unsigned long),
+                               u8 *output, long *posp,
                                void (*error) (char *x))
 {
        int ret = -1;
@@ -43,7 +43,7 @@ STATIC inline int INIT unlz4(u8 *input, int in_len,
        u8 *inp;
        u8 *inp_start;
        u8 *outp;
-       int size = in_len;
+       long size = in_len;
 #ifdef PREBOOT
        size_t out_len = get_unaligned_le32(input + in_len);
 #endif
@@ -196,11 +196,11 @@ exit_0:
 }
 
 #ifdef PREBOOT
-STATIC int INIT decompress(unsigned char *buf, int in_len,
-                             int(*fill)(void*, unsigned int),
-                             int(*flush)(void*, unsigned int),
+STATIC int INIT decompress(unsigned char *buf, long in_len,
+                             long (*fill)(void*, unsigned long),
+                             long (*flush)(void*, unsigned long),
                              unsigned char *output,
-                             int *posp,
+                             long *posp,
                              void(*error)(char *x)
        )
 {