projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2c82cb
)
Further micro-optimization.
author
Bruno Haible
<bruno@clisp.org>
Wed, 6 Aug 2008 22:15:07 +0000
(
00:15
+0200)
committer
Bruno Haible
<bruno@clisp.org>
Wed, 6 Aug 2008 22:15:07 +0000
(
00:15
+0200)
ChangeLog
patch
|
blob
|
history
lib/poll.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 0ab13226b1109cb38431a7448382b8d1d72a56f3..fdaff4ab63cd3d4c0d524cf1dbdcd818af66c05b 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-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
2008-08-06 Jim Meyering <meyering@redhat.com>
inet_pton.c: use locale-independent tolower
diff --git
a/lib/poll.c
b/lib/poll.c
index 2138b812827f3ca9eb0514d90518863480c3d101..4a62dc1df1a8f06854b0e4635bc541600d132ea2 100644
(file)
--- a/
lib/poll.c
+++ b/
lib/poll.c
@@
-55,7
+55,7
@@
poll (pfd, nfd, timeout)
int timeout;
{
fd_set rfds, wfds, efds;
int timeout;
{
fd_set rfds, wfds, efds;
- struct timeval tv
= { 0, 0 }
;
+ struct timeval tv;
struct timeval *ptv;
int maxfd, rc;
nfds_t i;
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)
/* 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;
else if (timeout > 0)
{
ptv = &tv;