From 6fb5e02a36284976fc630626390c24fd01fa2ebb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 7 Aug 2008 00:15:07 +0200 Subject: [PATCH] Further micro-optimization. --- ChangeLog | 4 ++++ lib/poll.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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; -- 2.30.2