aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix/clock_getres.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/clock_getres.c')
-rw-r--r--sysdeps/posix/clock_getres.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
index 5043ffd0e6..68c9591287 100644
--- a/sysdeps/posix/clock_getres.c
+++ b/sysdeps/posix/clock_getres.c
@@ -29,7 +29,7 @@
int
clock_getres (clockid_t clock_id, struct timespec *res)
{
- int retval;
+ int retval = -1;
switch (clock_id)
{
@@ -37,7 +37,6 @@ clock_getres (clockid_t clock_id, struct timespec *res)
{
long int clk_tck = sysconf (_SC_CLK_TCK);
- retval = -1;
if (__builtin_expect (clk_tck != -1, 1))
{
/* This implementation assumes that the realtime clock has a
@@ -55,7 +54,6 @@ clock_getres (clockid_t clock_id, struct timespec *res)
default:
__set_errno (EINVAL);
- retval = -1;
break;
}