Re: bagder: curl/ares ares_process.c,1.10,1.11
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 -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-07-31