Module Name:    src
Committed By:   apb
Date:           Mon Sep  1 11:21:29 UTC 2014

Modified Files:
        src/sys/dev: clock_subr.c

Log Message:
Revert previous; test secs > __type_max(time_t) again, now
that __type_max is available in tools/compat/compat_defs.h.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/clock_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/clock_subr.c
diff -u src/sys/dev/clock_subr.c:1.18 src/sys/dev/clock_subr.c:1.19
--- src/sys/dev/clock_subr.c:1.18	Mon Sep  1 07:49:43 2014
+++ src/sys/dev/clock_subr.c	Mon Sep  1 11:21:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_subr.c,v 1.18 2014/09/01 07:49:43 martin Exp $	*/
+/*	$NetBSD: clock_subr.c,v 1.19 2014/09/01 11:21:29 apb Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -46,7 +46,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock_subr.c,v 1.18 2014/09/01 07:49:43 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock_subr.c,v 1.19 2014/09/01 11:21:29 apb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,7 +121,7 @@ clock_ymdhms_to_secs(struct clock_ymdhms
 	    * 60 + dt->dt_min)
 	    * 60 + dt->dt_sec;
 
-	if ((time_t)secs < 0 || (uint64_t)(time_t)secs != secs)
+	if ((time_t)secs < 0 || secs > __type_max(time_t))
 		return -1;
 	return secs;
 }

Reply via email to