cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH v2] test536: do not fail with threaded DNS resolver

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Sat, 24 Apr 2010 12:11:03 +0200

On Saturday 24 of April 2010 10:34:08 Daniel Stenberg wrote:
> On Sat, 24 Apr 2010, Kamil Dudka wrote:
> > You say there we need to "make sure that maxfd is bigger than -1". But
> > in the code you intentionally do not in order to keep it working. What
> > about updating all the comments like following?
> >
> > /* In a real-world program you OF COURSE check the return code of the
> > function calls. On success, the value of maxfd is guaranteed to be
> > greater or equal than than -1. We call select(maxfd + 1, ...), specially
> > in case of (maxfd == -1), we call select(0, ...), which is basically
> > equal to sleep. */
>
> Yes I think that is a good idea. That seems like a better comment to use so
> that it is made more obvious what happens in the -1 case.

proposed patch

Kamil

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-04-24