Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Feb 2012 02:01:48 +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: r232286 - head/sys/kern
Message-ID:  <201202290201.q1T21mLQ002302@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202290201.q1T21mLQ002302>