cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl /tests/libtest lib503.c lib504.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 25 Oct 2003 08:07:11 +0200 (CEST)

On Sat, 25 Oct 2003, Gisle Vanem wrote:

(moved over from the curl-commit list)

> "Daniel Stenberg" <bagder_at_php.net> said:
>
> > Index: curl/tests/libtest/lib503.c
> > diff -u curl/tests/libtest/lib503.c:1.2 curl/tests/libtest/lib503.c:1.3
> > --- curl/tests/libtest/lib503.c:1.2 Wed Mar 12 03:54:45 2003
> > +++ curl/tests/libtest/lib503.c Fri Oct 24 16:58:34 2003
> > @@ -40,6 +40,7 @@
> > while(!done) {
> > fd_set rd, wr, exc;
> > int max_fd;
> > + struct timeval interval={1,0};
>
> Does the standard dictates the order of 'tv_sec' and
> 'tv_usec'? My POSIX standard only says this:
>
> The <sys/time.h> header shall define the timeval structure that
> includes *at least* the following members:
>
> time_t tv_sec Seconds.
> suseconds_t tv_usec Microseconds.
>
> So IMHO it's better to initialise 'tv' explicitly.

Thanks for your heads-up. I've now modified these to explicitly set the
fields.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
Received on 2003-10-25