Date: Tue, 21 Aug 2012 09:17:13 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239485 - head/lib/libc/gen Message-ID: <201208210917.q7L9HDmM003531@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davidxu Date: Tue Aug 21 09:17:13 2012 New Revision: 239485 URL: http://svn.freebsd.org/changeset/base/239485 Log: Fix prototype. Also the function should return error code instead of -1 on error. Modified: head/lib/libc/gen/clock_getcpuclockid.c Modified: head/lib/libc/gen/clock_getcpuclockid.c ============================================================================== --- head/lib/libc/gen/clock_getcpuclockid.c Tue Aug 21 09:14:34 2012 (r239484) +++ head/lib/libc/gen/clock_getcpuclockid.c Tue Aug 21 09:17:13 2012 (r239485) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208210917.q7L9HDmM003531>