Author: davidxu Date: Wed Feb 29 02:01:48 2012 New Revision: 232286 URL: http://svn.freebsd.org/changeset/base/232286
Log: initialize clock ID and flags only when copying timespec, a _umtx_time copy already contains these fields. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Wed Feb 29 01:39:39 2012 (r232285) +++ head/sys/kern/kern_umtx.c Wed Feb 29 02:01:48 2012 (r232286) @@ -2937,11 +2937,11 @@ umtx_copyin_umtx_time(const void *addr, { int error; - tp->_clockid = CLOCK_REALTIME; - tp->_flags = 0; - if (size <= sizeof(struct timespec)) + if (size <= sizeof(struct timespec)) { + tp->_clockid = CLOCK_REALTIME; + tp->_flags = 0; error = copyin(addr, &tp->_timeout, sizeof(struct timespec)); - else + } else error = copyin(addr, tp, sizeof(struct _umtx_time)); if (error != 0) return (error); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"