From: Bruno Haible Date: Wed, 6 Aug 2008 22:15:07 +0000 (+0200) Subject: Further micro-optimization. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb5e02a36284976fc630626390c24fd01fa2ebb;p=pspp Further micro-optimization. --- diff --git a/ChangeLog b/ChangeLog index 0ab13226b1..fdaff4ab63 100644 --- 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 index 2138b81282..4a62dc1df1 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -55,7 +55,7 @@ poll (pfd, nfd, timeout) 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 @@ poll (pfd, nfd, timeout) /* 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;