diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
commit | 8833066b122427710a9e14a888ce6cfa862332d3 (patch) | |
tree | 29591019d695919417b3698618d6a342e97381d6 /sysdeps/unix/clock_gettime.c | |
parent | fedca46896bdb702cb988837a0c2c5447e72ba2b (diff) |
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'sysdeps/unix/clock_gettime.c')
-rw-r--r-- | sysdeps/unix/clock_gettime.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c index f698f0151b..fbaaf301e4 100644 --- a/sysdeps/unix/clock_gettime.c +++ b/sysdeps/unix/clock_gettime.c @@ -1,5 +1,5 @@ /* clock_gettime -- Get the current time from a POSIX clockid_t. Unix version. - Copyright (C) 1999-2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1999-2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -93,7 +93,6 @@ int clock_gettime (clockid_t clock_id, struct timespec *tp) { int retval = -1; - struct timeval tv; switch (clock_id) { @@ -103,9 +102,12 @@ clock_gettime (clockid_t clock_id, struct timespec *tp) #ifndef HANDLED_REALTIME case CLOCK_REALTIME: - retval = gettimeofday (&tv, NULL); - if (retval == 0) - TIMEVAL_TO_TIMESPEC (&tv, tp); + { + struct timeval tv; + retval = gettimeofday (&tv, NULL); + if (retval == 0) + TIMEVAL_TO_TIMESPEC (&tv, tp); + } break; #endif |