mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
lz4: fix compression/decompression signedness mismatch
LZ4 compression and decompression functions require different in signedness input/output parameters: unsigned char for compression and signed char for decompression. Change decompression API to require "(const) unsigned char *". Signed-off-by: Sergey Senozhatsky <[email protected]> Cc: Kyungsik Lee <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Yann Collet <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
20b8875abc
commit
b34081f1cd
2 changed files with 8 additions and 8 deletions
|
|
@ -283,8 +283,8 @@ _output_error:
|
|||
return (int) (-(((char *) ip) - source));
|
||||
}
|
||||
|
||||
int lz4_decompress(const char *src, size_t *src_len, char *dest,
|
||||
size_t actual_dest_len)
|
||||
int lz4_decompress(const unsigned char *src, size_t *src_len,
|
||||
unsigned char *dest, size_t actual_dest_len)
|
||||
{
|
||||
int ret = -1;
|
||||
int input_len = 0;
|
||||
|
|
@ -302,8 +302,8 @@ exit_0:
|
|||
EXPORT_SYMBOL(lz4_decompress);
|
||||
#endif
|
||||
|
||||
int lz4_decompress_unknownoutputsize(const char *src, size_t src_len,
|
||||
char *dest, size_t *dest_len)
|
||||
int lz4_decompress_unknownoutputsize(const unsigned char *src, size_t src_len,
|
||||
unsigned char *dest, size_t *dest_len)
|
||||
{
|
||||
int ret = -1;
|
||||
int out_len = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue