Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2013 21:35:33 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259633 - head/sys/kern
Message-ID:  <201312192135.rBJLZX77018293@svn.freebsd.org>

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



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