diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-02-11 16:21:43 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-02-11 16:21:43 +0000 |
commit | 6c8cc2d3042d0585741452006c29cb21fbba39ea (patch) | |
tree | 9050443fde19b762762681cb114b3ca55831a038 /nscd | |
parent | ce28a8ab09cdd49890261d37b5b9280131d18014 (diff) |
Updated to fedora-glibc-20070211T1607cvs/fedora-glibc-2_5_90-17
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/nscd_helper.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 394b2f86e6..577c6a052a 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -127,6 +127,8 @@ open_socket (request_type type, const char *key, size_t keylen) bool first_try = true; struct timeval tvend; + /* Fake initializing tvend. */ + asm ("" : "=m" (tvend)); while (1) { #ifndef MSG_NOSIGNAL @@ -145,20 +147,18 @@ open_socket (request_type type, const char *key, size_t keylen) /* The daemon is busy wait for it. */ int to; + struct timeval now; + (void) __gettimeofday (&now, NULL); if (first_try) { - gettimeofday (&tvend, NULL); - tvend.tv_sec += 5; + tvend.tv_usec = now.tv_usec; + tvend.tv_sec = now.tv_sec + 5; to = 5 * 1000; first_try = false; } else - { - struct timeval now; - gettimeofday (&now, NULL); - to = ((tvend.tv_sec - now.tv_sec) * 1000 - + (tvend.tv_usec - now.tv_usec) / 1000); - } + to = ((tvend.tv_sec - now.tv_sec) * 1000 + + (tvend.tv_usec - now.tv_usec) / 1000); struct pollfd fds[1]; fds[0].fd = sock; |