diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2011-01-12 20:01:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:23 -0500 |
commit | 93685ad247ef65b7d6f90ffe97b44f5cfeaf40d3 (patch) | |
tree | 979868b5a03a7e73c792e222646a1876b3dc0216 /lib/decompress_inflate.c | |
parent | 6b01ed64c19b52121a717274d271d9915f8d3e94 (diff) |
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>
Diffstat (limited to 'lib/decompress_inflate.c')
-rw-r--r-- | lib/decompress_inflate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 1eea07e8f21b..9a7f5dfc0ed7 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c | |||
@@ -38,13 +38,12 @@ STATIC int INIT gunzip(unsigned char *buf, int len, | |||
38 | int(*flush)(void*, unsigned int), | 38 | int(*flush)(void*, unsigned int), |
39 | unsigned char *out_buf, | 39 | unsigned char *out_buf, |
40 | int *pos, | 40 | int *pos, |
41 | void(*error_fn)(char *x)) { | 41 | void(*error)(char *x)) { |
42 | u8 *zbuf; | 42 | u8 *zbuf; |
43 | struct z_stream_s *strm; | 43 | struct z_stream_s *strm; |
44 | int rc; | 44 | int rc; |
45 | size_t out_len; | 45 | size_t out_len; |
46 | 46 | ||
47 | set_error_fn(error_fn); | ||
48 | rc = -1; | 47 | rc = -1; |
49 | if (flush) { | 48 | if (flush) { |
50 | out_len = 0x8000; /* 32 K */ | 49 | out_len = 0x8000; /* 32 K */ |