Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Revert previous; test secs > __type_max(time_t) agai...
details: https://anonhg.NetBSD.org/src/rev/cc064d4dd4e4
branches: trunk
changeset: 331940:cc064d4dd4e4
user: apb <apb%NetBSD.org@localhost>
date: Mon Sep 01 11:21:29 2014 +0000
description:
Revert previous; test secs > __type_max(time_t) again, now
that __type_max is available in tools/compat/compat_defs.h.
diffstat:
sys/dev/clock_subr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 2e1e1625b15a -r cc064d4dd4e4 sys/dev/clock_subr.c
--- a/sys/dev/clock_subr.c Mon Sep 01 11:20:06 2014 +0000
+++ b/sys/dev/clock_subr.c Mon Sep 01 11:21:29 2014 +0000
@@ -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 @@
* 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;
}
Home |
Main Index |
Thread Index |
Old Index