From owner-svn-src-all@FreeBSD.ORG Thu Dec 19 20:47:07 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE8BA8FD; Thu, 19 Dec 2013 20:47:07 +0000 (UTC) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DFEF175E; Thu, 19 Dec 2013 20:47:06 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id rBJKklVI054671; Thu, 19 Dec 2013 21:47:02 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <52B35B37.5070809@FreeBSD.org> Date: Thu, 19 Dec 2013 21:46:47 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Stefan Esser , Bruce Evans Subject: Re: svn commit: r259609 - head/sys/kern References: <201312190901.rBJ91ko3036881@svn.freebsd.org> <20131219204903.V24189@besplex.bde.org> <52B32647.2030008@freebsd.org> In-Reply-To: <52B32647.2030008@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Thu, 19 Dec 2013 20:47:08 -0000 On 19.12.13 18:00, Stefan Esser wrote: > I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the > missing empty line: > > static __inline sbintime_t > timer2sbintime(intptr_t data) > { > > if (data > INT64_MAX / SBT_1MS) > return INT64_MAX; > return (SBT_1MS * data); > } > > If you can show evidence that a limit of INT64_MAX/2 is more appropriate > (2^30 seconds or 34 years), the limit could be of course be reduced to > that value. > > I could not find any code that would not tolerate INT64_MAX, though ... Aehm, what about 32-bit systems where intptr_t == __int32_t? cc1: warnings being treated as errors /export/devel/fbsd/src/sys/kern/kern_event.c: In function 'timer2sbintime': /export/devel/fbsd/src/sys/kern/kern_event.c:529: warning: comparison is always false due to limited range of data type Andreas