aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decompress_bunzip2.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2011-01-12 20:01:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:23 -0500
commit93685ad247ef65b7d6f90ffe97b44f5cfeaf40d3 (patch)
tree979868b5a03a7e73c792e222646a1876b3dc0216 /lib/decompress_bunzip2.c
parent6b01ed64c19b52121a717274d271d9915f8d3e94 (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_bunzip2.c')
-rw-r--r--lib/decompress_bunzip2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index 81c8bb1cc6aa..e805087f5561 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -682,13 +682,12 @@ STATIC int INIT bunzip2(unsigned char *buf, int len,
682 int(*flush)(void*, unsigned int), 682 int(*flush)(void*, unsigned int),
683 unsigned char *outbuf, 683 unsigned char *outbuf,
684 int *pos, 684 int *pos,
685 void(*error_fn)(char *x)) 685 void(*error)(char *x))
686{ 686{
687 struct bunzip_data *bd; 687 struct bunzip_data *bd;
688 int i = -1; 688 int i = -1;
689 unsigned char *inbuf; 689 unsigned char *inbuf;
690 690
691 set_error_fn(error_fn);
692 if (flush) 691 if (flush)
693 outbuf = malloc(BZIP2_IOBUF_SIZE); 692 outbuf = malloc(BZIP2_IOBUF_SIZE);
694 693
@@ -751,8 +750,8 @@ STATIC int INIT decompress(unsigned char *buf, int len,
751 int(*flush)(void*, unsigned int), 750 int(*flush)(void*, unsigned int),
752 unsigned char *outbuf, 751 unsigned char *outbuf,
753 int *pos, 752 int *pos,
754 void(*error_fn)(char *x)) 753 void(*error)(char *x))
755{ 754{
756 return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error_fn); 755 return bunzip2(buf, len - 4, fill, flush, outbuf, pos, error);
757} 756}
758#endif 757#endif