summaryrefslogtreecommitdiffstats
path: root/lzip_decompress.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-24 12:33:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-24 12:33:59 +0000
commit49939235e7e9dc44be30d428909a83bcb6893222 (patch)
treeb08fea28574729e30050cd927b0abe77d39d8345 /lzip_decompress.c
parentAdding upstream version 0.3. (diff)
downloadxlunzip-49939235e7e9dc44be30d428909a83bcb6893222.tar.xz
xlunzip-49939235e7e9dc44be30d428909a83bcb6893222.zip
Adding upstream version 0.4.upstream/0.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--lzip_decompress.c (renamed from lzip.c)9
1 files changed, 5 insertions, 4 deletions
diff --git a/lzip.c b/lzip_decompress.c
index 7c96975..9c5b8fb 100644
--- a/lzip.c
+++ b/lzip_decompress.c
@@ -6,12 +6,13 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+#include "linux_module.h"
#include "linux_lzip.h"
#include "linux_mm.h"
/*
* STATIC_RW_DATA is used in the pre-boot environment on some architectures.
- * See <linux/decompress/mm.h> for details.
+ * See include/linux/decompress/mm.h for details.
*/
#ifndef STATIC_RW_DATA
#define STATIC_RW_DATA static
@@ -637,7 +638,7 @@ static inline bool LZd_init(struct LZ_decoder * const d,
Lm_init(&d->rep_len_model);
d->buffer_given = (outbuf && out_size > 0);
- d->buffer_size = d->buffer_given ? out_size : dict_size;
+ d->buffer_size = d->buffer_given ? (unsigned long)out_size : dict_size;
d->dictionary_size = min_t(unsigned long, d->buffer_size, dict_size);
d->buffer = d->buffer_given ? outbuf : large_malloc(d->buffer_size);
if (!d->buffer)
@@ -686,7 +687,7 @@ static bool LZd_verify_trailer(struct LZ_decoder * const d)
}
-/* Return value: 0 = OK, < 0 = error (see <linux/lzip.h>). */
+/* Return value: 0 = OK, < 0 = error (see include/linux/lzip.h). */
static int LZd_decode_member(struct LZ_decoder * const d)
{
struct Range_decoder * const rdec = d->rdec;
@@ -875,7 +876,7 @@ int lzip_decompress(unsigned char *inbuf, long in_len,
#ifndef STATIC
EXPORT_SYMBOL_GPL(lzip_decompress);
+#endif
MODULE_DESCRIPTION("LZIP Decompressor");
MODULE_AUTHOR("Antonio Diaz Diaz <antonio@gnu.org>");
MODULE_LICENSE("GPL");
-#endif