* tests/test-select.c (do_select_nowait): Zero-initialize the timeout
at every invocation.
+2010-12-27 Bruno Haible <bruno@clisp.org>
+
+ select tests: Safer way of handling timeout.
+ * tests/test-select.c (do_select_nowait): Zero-initialize the timeout
+ at every invocation.
+
2010-12-27 Bruno Haible <bruno@clisp.org>
select tests: Use 'bool' where appropriate.
static int
do_select_nowait (int fd, int ev)
{
- static struct timeval tv0;
+ struct timeval tv0;
+ tv0.tv_sec = 0;
+ tv0.tv_usec = 0;
return do_select (fd, ev, &tv0);
}