mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
Decompressors: get rid of set_error_fn() macro
set_error_fn() has become a useless complication after c1e7c3ae59
("bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure") fixed
the use of error() in malloc(). Only decompress_unlzma.c had some use for
it and that was easy to change too.
This also gets rid of the static function pointer "error", which
should have been marked as __initdata.
Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alain Knaff <alain@knaff.lu>
Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6b01ed64c1
commit
93685ad247
5 changed files with 11 additions and 19 deletions
|
@ -682,13 +682,12 @@ STATIC int INIT bunzip2(unsigned char *buf, int len,
|
|||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *outbuf,
|
||||
int *pos,
|
||||
void(*error_fn)(char *x))
|
||||
void(*error)(char *x))
|
||||
{
|
||||
struct bunzip_data *bd;
|
||||
int i = -1;
|
||||
unsigned char *inbuf;
|
||||
|
||||
set_error_fn(error_fn);
|
||||
if (flush)
|
||||
outbuf = malloc(BZIP2_IOBUF_SIZE);
|
||||
|
||||
|
@ -751,8 +750,8 @@ STATIC int INIT decompress(unsigned char *buf, int len,
|
|||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *outbuf,
|
||||
int *pos,
|
||||
void(*error_fn)(char *x))
|
||||
void(*error)(char *x))
|
||||
{
|
||||
return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error_fn);
|
||||
return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue