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);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to