From owner-svn-src-head@FreeBSD.ORG Thu Dec 19 21:35:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BFCFCC8; Thu, 19 Dec 2013 21:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 086E41B2A; Thu, 19 Dec 2013 21:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBJLZXlJ018294; Thu, 19 Dec 2013 21:35:33 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBJLZX77018293; Thu, 19 Dec 2013 21:35:33 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201312192135.rBJLZX77018293@svn.freebsd.org> From: Stefan Esser Date: Thu, 19 Dec 2013 21:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259633 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 21:35:34 -0000 Author: se Date: Thu Dec 19 21:35:33 2013 New Revision: 259633 URL: http://svnweb.freebsd.org/changeset/base/259633 Log: Fix compilation on 32 bit architectures and use INT64_MAX instead of LONG_MAX for the upper bound check. Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Thu Dec 19 21:31:28 2013 (r259632) +++ head/sys/kern/kern_event.c Thu Dec 19 21:35:33 2013 (r259633) @@ -523,11 +523,14 @@ knote_fork(struct knlist *list, int pid) * XXX: EVFILT_TIMER should perhaps live in kern_time.c beside the * interval timer support code. */ -static __inline sbintime_t +static __inline sbintime_t timer2sbintime(intptr_t data) { - if (data > LLONG_MAX / SBT_1MS) - return LLONG_MAX; + +#ifdef __LP64__ + if (data > INT64_MAX / SBT_1MS) + return INT64_MAX; +#endif return (SBT_1MS * data); }