Skip to contentSkip to conversation

Fix prototype of function zfree.

PATCH In review Stefan Weil 1 participant 2 messages May 24, 2009 – May 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix prototype of function zfree.

---
 loader.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
loader.c +0 -0
index 5232ee1..9350c54 100644
@@ -382,7 +382,7 @@ static void *zalloc(void *x, unsigned items,

unsigned size)

     return (p);

}

-static void zfree(void *x, void *addr, unsigned nb) +static void zfree(void *x, void *addr)

 {
     qemu_free(addr);
 }
@@ -430,7 +430,7 @@ static ssize_t gunzip(void *dst, size_t dstlen,
uint8_t *src,
     }

     s.zalloc = zalloc;

- s.zfree = (free_func)zfree;
+ s.zfree = zfree;

     r = inflateInit2(&s, -MAX_WBITS);
     if (r != Z_OK) {

--
1.5.6.5

#1 lore raw
Quoted 29 lines · Stefan Weil
---
 loader.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
loader.c +1 -1
index 5232ee1..9350c54 100644
@@ -382,7 +382,7 @@ static void *zalloc(void *x, unsigned items,
 unsigned size)
     return (p);
 }
 
-static void zfree(void *x, void *addr, unsigned nb)
+static void zfree(void *x, void *addr)
 {
     qemu_free(addr);

}

loader.c +1 -1
@@ -430,7 +430,7 @@ static ssize_t gunzip(void *dst, size_t dstlen,
 uint8_t *src,
     }
 
     s.zalloc = zalloc;
-    s.zfree = (free_func)zfree;
+    s.zfree = zfree;
 
     r = inflateInit2(&s, -MAX_WBITS);
     if (r != Z_OK) {
Quoted 5 lines

--
1.5.6.5

The patch above was whitespace broken. The appended patch will work.

Regards,

Stefan Weil

Quoted 1 line

From 850d19151523f20d5d841cd8d3d532b058d4749c Mon Sep 17 00:00:00 2001

From: Stefan Weil <[email protected]>
Date: Sun, 24 May 2009 22:54:06 +0200
Subject: [PATCH] Fix prototype of function zfree.

---
 loader.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
loader.c +2 -2
index 5232ee1..9350c54 100644
@@ -382,7 +382,7 @@ static void *zalloc(void *x, unsigned items, unsigned size)
     return (p);
 }
 
-static void zfree(void *x, void *addr, unsigned nb)
+static void zfree(void *x, void *addr)
 {
     qemu_free(addr);
 }
@@ -430,7 +430,7 @@ static ssize_t gunzip(void *dst, size_t dstlen, uint8_t *src,
     }
 
     s.zalloc = zalloc;
-    s.zfree = (free_func)zfree;
+    s.zfree = zfree;
 
     r = inflateInit2(&s, -MAX_WBITS);
     if (r != Z_OK) {
Signature · 1 line
1.5.6.5