From c3e52ea6ca3178b7ecab4b389a9ba9269662b48f Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 15 Mar 2006 17:05:25 +0000 Subject: Further cleanups to compile with C++ compiler. svn path=/branches/BRANCH_6-3/; revision=4744 --- driver.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'driver.c') diff --git a/driver.c b/driver.c index 89aeb36c..1d39f068 100644 --- a/driver.c +++ b/driver.c @@ -443,7 +443,7 @@ static int fetch_messages(int mailserver_socket, struct query *ctl, /* Time to allocate memory to store the sizes */ xfree(*msgsizes); - *msgsizes = xmalloc(sizeof(int) * fetchsizelimit); + *msgsizes = (int *)xmalloc(sizeof(int) * fetchsizelimit); } /* @@ -1029,7 +1029,7 @@ static int do_session( { xfree(ctl->server.truename); ctl->server.truename = xstrdup(res->ai_canonname); - ctl->server.trueaddr = xmalloc(res->ai_addrlen); + ctl->server.trueaddr = (struct sockaddr *)xmalloc(res->ai_addrlen); ctl->server.trueaddr_len = res->ai_addrlen; memcpy(ctl->server.trueaddr, res->ai_addr, res->ai_addrlen); freeaddrinfo(res); @@ -1397,7 +1397,7 @@ is restored.")); !(proto->getpartialsizes && NUM_NONZERO(ctl->fetchsizelimit))) { xfree(msgsizes); - msgsizes = xmalloc(sizeof(int) * count); + msgsizes = (int *)xmalloc(sizeof(int) * count); for (i = 0; i < count; i++) msgsizes[i] = 0; @@ -1575,10 +1575,9 @@ closeUp: return(err); } -int do_protocol(ctl, proto) -/* retrieve messages from server using given protocol method table */ -struct query *ctl; /* parsed options with merged-in defaults */ -const struct method *proto; /* protocol method table */ +/** retrieve messages from server using given protocol method table */ +int do_protocol(struct query *ctl /** parsed options with merged-in defaults */, + const struct method *proto /** protocol method table */) { int err; -- cgit v1.2.3