svn commit: r232286 - head/sys/kern
David Xu
davidxu at FreeBSD.org
Wed Feb 29 02:01:49 UTC 2012
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);
More information about the svn-src-head
mailing list