changeset 10310:b48c3c82f4d9

Further micro-optimization.
author Bruno Haible <bruno@clisp.org>
date Thu, 07 Aug 2008 00:15:07 +0200
parents 5585c3effb24
children cf0f3d5f214e
files ChangeLog lib/poll.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 06 11:49:11 2008 +0200
+++ b/ChangeLog	Thu Aug 07 00:15:07 2008 +0200
@@ -1,3 +1,7 @@
+2008-08-06  Bruno Haible  <bruno@clisp.org>
+
+	* lib/poll.c (poll): Further micro-optimization.
+
 2008-08-06  Jim Meyering  <meyering@redhat.com>
 
 	inet_pton.c: use locale-independent tolower
--- a/lib/poll.c	Wed Aug 06 11:49:11 2008 +0200
+++ b/lib/poll.c	Thu Aug 07 00:15:07 2008 +0200
@@ -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;