# HG changeset patch # User Bruno Haible # Date 1218060907 -7200 # Node ID b48c3c82f4d9e08f16c2d46d46bccc5fb14b812d # Parent 5585c3effb248511555d48edb41b5b5f664c3bef Further micro-optimization. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-06 Bruno Haible + + * lib/poll.c (poll): Further micro-optimization. + 2008-08-06 Jim Meyering inet_pton.c: use locale-independent tolower diff --git a/lib/poll.c b/lib/poll.c --- a/lib/poll.c +++ b/lib/poll.c @@ -55,7 +55,7 @@ int timeout; { fd_set rfds, wfds, efds; - struct timeval tv = { 0, 0 }; + struct timeval tv; struct timeval *ptv; int maxfd, rc; nfds_t i; @@ -91,7 +91,11 @@ /* convert timeout number into a timeval structure */ if (timeout == 0) - ptv = &tv; + { + ptv = &tv; + ptv->tv_sec = 0; + ptv->tv_usec = 0; + } else if (timeout > 0) { ptv = &tv;