Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev use symbolic constants (Kamil Rytarowski)
details: https://anonhg.NetBSD.org/src/rev/2ac20b2bef22
branches: trunk
changeset: 335038:2ac20b2bef22
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 22 18:09:20 2014 +0000
description:
use symbolic constants (Kamil Rytarowski)
diffstat:
sys/dev/clock_subr.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 834129e09935 -r 2ac20b2bef22 sys/dev/clock_subr.c
--- a/sys/dev/clock_subr.c Mon Dec 22 18:08:39 2014 +0000
+++ b/sys/dev/clock_subr.c Mon Dec 22 18:09:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock_subr.c,v 1.25 2014/11/17 10:55:42 joerg Exp $ */
+/* $NetBSD: clock_subr.c,v 1.26 2014/12/22 18:09:20 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
#ifdef _KERNEL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock_subr.c,v 1.25 2014/11/17 10:55:42 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock_subr.c,v 1.26 2014/12/22 18:09:20 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -195,10 +195,10 @@
dt->dt_day = days + 1;
/* Hours, minutes, seconds are easy */
- dt->dt_hour = rsec / 3600;
- rsec = rsec % 3600;
- dt->dt_min = rsec / 60;
- rsec = rsec % 60;
+ dt->dt_hour = rsec / SECS_PER_HOUR;
+ rsec = rsec % SECS_PER_HOUR;
+ dt->dt_min = rsec / SECS_PER_MINUTE;
+ rsec = rsec % SECS_PER_MINUTE;
dt->dt_sec = rsec;
return 0;
Home |
Main Index |
Thread Index |
Old Index