From owner-svn-src-all@FreeBSD.ORG Wed Feb 29 02:01:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 282D1106564A; Wed, 29 Feb 2012 02:01:49 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 148098FC18; Wed, 29 Feb 2012 02:01:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1T21mD8002304; Wed, 29 Feb 2012 02:01:48 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1T21mLQ002302; Wed, 29 Feb 2012 02:01:48 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201202290201.q1T21mLQ002302@svn.freebsd.org> From: David Xu Date: Wed, 29 Feb 2012 02:01:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232286 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Feb 2012 02:01:49 -0000 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);