From 8e4bfa7520c919ec2a7b00067c3348f0d1c73c8d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 18 Mar 2010 23:29:22 +0100 Subject: Further type fixes. --- smbutil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'smbutil.c') diff --git a/smbutil.c b/smbutil.c index fd239d9c..a26b3496 100644 --- a/smbutil.c +++ b/smbutil.c @@ -84,12 +84,12 @@ static void dumpRaw(FILE *fp, unsigned char *buf, size_t len) /* helper macro to destructively resize buffers; assumes that bufsiz * is initialized to 0 if buf is unallocated! */ -#define allocbuf(buf, bufsiz, need) do { \ +#define allocbuf(buf, bufsiz, need, type) do { \ if (!buf || (need) > (bufsiz)) \ { \ (bufsiz) = ((need) < 1024) ? 1024 : (need); \ xfree(buf); \ - (buf) = xmalloc(bufsiz); \ + (buf) = (type)xmalloc(bufsiz); \ } \ } while (0); @@ -101,7 +101,7 @@ static char *unicodeToString(char *p, size_t len) static char *buf; static size_t bufsiz; - allocbuf(buf, bufsiz, len + 1); + allocbuf(buf, bufsiz, len + 1, char *); for (i=0; i