diff options
author | davidxu <davidxu@FreeBSD.org> | 2012-08-21 09:17:13 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2012-08-21 09:17:13 +0000 |
commit | 225cbe2a015f0724358f5647a1a626ffd4ed65f1 (patch) | |
tree | 6dbe7abbd770417bccf00c36a20de9ce01b9c12a /lib/libc | |
parent | 6224c8cbb9561c0dfb1502c7d8a27d973e64a40d (diff) | |
download | FreeBSD-src-225cbe2a015f0724358f5647a1a626ffd4ed65f1.zip FreeBSD-src-225cbe2a015f0724358f5647a1a626ffd4ed65f1.tar.gz |
Fix prototype. Also the function should return error code instead of
-1 on error.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/clock_getcpuclockid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/gen/clock_getcpuclockid.c b/lib/libc/gen/clock_getcpuclockid.c index fc12bd6..f26035f 100644 --- a/lib/libc/gen/clock_getcpuclockid.c +++ b/lib/libc/gen/clock_getcpuclockid.c @@ -32,8 +32,10 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <sys/time.h> -clockid_t +int clock_getcpuclockid(pid_t pid, clockid_t *clock_id) { - return clock_getcpuclockid2(pid, CPUCLOCK_WHICH_PID, clock_id); + if (clock_getcpuclockid2(pid, CPUCLOCK_WHICH_PID, clock_id)) + return (errno); + return (0); } |