mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Anatolij Gustschin
parent
9a800ac718
commit
e3ed0575a7
11
lib/gunzip.c
11
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) {
|
||||
|
Reference in New Issue
Block a user