summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-05-21 18:18:19 +0000
committerUlrich Drepper <drepper@redhat.com>2005-05-21 18:18:19 +0000
commit572215377f0220adef77eefccedc731cd4fb523a (patch)
treec424bc0ee8d2bd21c86b77c2747164308d74c9f9 /sysdeps
parent43d0c8ee8430273c2f5d1de7be5a6a3a8c7b8d68 (diff)
(clock_getcpuclockid): Always return a defined value.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/clock_getcpuclockid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
index ac893c0a77..2e5d2e7aee 100644
--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
@@ -1,5 +1,5 @@
/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux version.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 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
@@ -38,11 +38,11 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
extern int __libc_missing_posix_cpu_timers attribute_hidden;
-# if !(__ASSUME_POSIX_TIMERS > 0)
+# if !(__ASSUME_POSIX_TIMERS > 0)
extern int __libc_missing_posix_timers attribute_hidden;
if (__libc_missing_posix_timers && !__libc_missing_posix_cpu_timers)
__libc_missing_posix_cpu_timers = 1;
-# endif
+# endif
if (!__libc_missing_posix_cpu_timers)
# endif
{
@@ -82,7 +82,7 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
else
return INTERNAL_SYSCALL_ERRNO (r, err);
}
-# endif
+#endif
/* We don't allow any process ID but our own. */
if (pid != 0 && pid != getpid ())
@@ -96,8 +96,8 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
return 0;
}
-#else
+#endif
+
/* We don't have a timer for that. */
return ENOENT;
-#endif
}