summaryrefslogtreecommitdiff
path: root/lib/gunzip.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-09 13:39:53 +0000
committerAnatolij Gustschin <agust@denx.de>2012-04-30 16:54:51 +0200
commite3ed0575a7ce68c1c533978fc171c7611598dc4e (patch)
treeb3961648748950bd490b193f469b3c4d71d56702 /lib/gunzip.c
parent9a800ac718abcac0aff6f98b922ceb236f411ffd (diff)
downloadu-boot-imx-e3ed0575a7ce68c1c533978fc171c7611598dc4e.zip
u-boot-imx-e3ed0575a7ce68c1c533978fc171c7611598dc4e.tar.gz
u-boot-imx-e3ed0575a7ce68c1c533978fc171c7611598dc4e.tar.bz2
gunzip: rename z{alloc, free} to gz{alloc, free}
This allows us to add a proper zalloc() func (one that does a zeroing alloc), and removes duplicate prototypes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib/gunzip.c')
-rw-r--r--lib/gunzip.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 8b16b24..99a8ab0 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -36,10 +36,7 @@
#define RESERVED 0xe0
#define DEFLATED 8
-void *zalloc(void *, unsigned, unsigned);
-void zfree(void *, void *, unsigned);
-
-void *zalloc(void *x, unsigned items, unsigned size)
+void *gzalloc(void *x, unsigned items, unsigned size)
{
void *p;
@@ -51,7 +48,7 @@ void *zalloc(void *x, unsigned items, unsigned size)
return (p);
}
-void zfree(void *x, void *addr, unsigned nb)
+void gzfree(void *x, void *addr, unsigned nb)
{
free (addr);
}
@@ -94,8 +91,8 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
z_stream s;
int r;
- s.zalloc = zalloc;
- s.zfree = zfree;
+ s.zalloc = gzalloc;
+ s.zfree = gzfree;
r = inflateInit2(&s, -MAX_WBITS);
if (r != Z_OK) {