Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: bagder: curl/ares ares_process.c,1.10,1.11

From: Daniel Stenberg <>
Date: Sat, 31 Jul 2004 09:12:39 +0200 (CEST)

On Fri, 30 Jul 2004, Gisle Vanem wrote:

>> @@ -143,16 +144,16 @@
>> /* Can't allocate iovecs; just send the first request. */
>> sendreq = server->qhead;
>> - count = send(server->tcp_socket, sendreq->data, sendreq->len, 0);
>> + scount = send(server->tcp_socket, sendreq->data, sendreq->len, 0);
> I fail to see the point of the else-part. If allocating N iovecs fails,
> we're toast anyway. send() may allocate process memory too. And later on
> anyway when the answers should be processed.

Reading this code again, I can only agree with you. Let's cut out the else
part and have it fail normally if malloc() fails.

> Is there a story behind this?

Probably, but since the original author isn't reading this I bet we won't get
any info on that... :-(

      Daniel Stenberg -- --
       Dedicated custom curl help for hire:
Received on 2004-07-31

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET