aboutsummaryrefslogtreecommitdiffstats
path: root/smbutil.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-03-18 23:29:22 +0100
committerMatthias Andree <matthias.andree@gmx.de>2010-03-18 23:29:22 +0100
commit8e4bfa7520c919ec2a7b00067c3348f0d1c73c8d (patch)
treef5342330bc2dea4ed531ce9ff130cbe2546e1121 /smbutil.c
parent05cb2b9c62b323a1278c81b6cbe00b2e4186b4f4 (diff)
downloadfetchmail-8e4bfa7520c919ec2a7b00067c3348f0d1c73c8d.tar.gz
fetchmail-8e4bfa7520c919ec2a7b00067c3348f0d1c73c8d.tar.bz2
fetchmail-8e4bfa7520c919ec2a7b00067c3348f0d1c73c8d.zip
Further type fixes.
Diffstat (limited to 'smbutil.c')
-rw-r--r--smbutil.c10
1 files changed, 5 insertions, 5 deletions
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<len; ++i)
{
@@ -121,7 +121,7 @@ static unsigned char *strToUnicode(char *p)
size_t l = strlen(p);
int i = 0;
- allocbuf(buf, bufsiz, l * 2);
+ allocbuf(buf, bufsiz, l * 2, unsigned char *);
while (l--)
{
@@ -137,7 +137,7 @@ static unsigned char *toString(char *p, size_t len)
static unsigned char *buf;
static size_t bufsiz;
- allocbuf(buf, bufsiz, len + 1);
+ allocbuf(buf, bufsiz, len + 1, unsigned char *);
memcpy(buf,p,len);
buf[len] = 0;