summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2009-01-28 09:19:36 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2009-04-22 01:28:21 +0200
commit0a081b682fdc6a061195108882d5bc25f7f9cb1f (patch)
tree7d0d28acfd655bfb769c417c20e5a8c5eb8c1c46
parent228a57ba707f81bf8419c41fb912f50c6ab60b70 (diff)
downloadmultipath-tools-0a081b682fdc6a061195108882d5bc25f7f9cb1f.tar.gz
multipath-tools-0a081b682fdc6a061195108882d5bc25f7f9cb1f.tar.bz2
multipath-tools-0a081b682fdc6a061195108882d5bc25f7f9cb1f.zip
Correct definition of dbg_malloc()
Any malloc function should return 'void *' to avoid type mismatch errors. Signed-off-by: Hannes Reinecke <hare@suse.de>
-rw-r--r--libmultipath/memory.c2
-rw-r--r--libmultipath/memory.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libmultipath/memory.c b/libmultipath/memory.c
index bd6ae5e..1366f45 100644
--- a/libmultipath/memory.c
+++ b/libmultipath/memory.c
@@ -93,7 +93,7 @@ static int number_alloc_list = 0;
static int n = 0; /* Alloc list pointer */
static int f = 0; /* Free list pointer */
-char *
+void *
dbg_malloc(unsigned long size, char *file, char *function, int line)
{
void *buf;
diff --git a/libmultipath/memory.h b/libmultipath/memory.h
index ab98094..882699b 100644
--- a/libmultipath/memory.h
+++ b/libmultipath/memory.h
@@ -55,7 +55,7 @@ int debug;
(__FILE__), (char *)(__FUNCTION__), (__LINE__)) )
/* Memory debug prototypes defs */
-extern char *dbg_malloc(unsigned long, char *, char *, int);
+extern void *dbg_malloc(unsigned long, char *, char *, int);
extern int dbg_free(void *, char *, char *, int);
extern void *dbg_realloc(void *, unsigned long, char *, char *, int);
extern char *dbg_strdup(char *, char *, char *, int);