summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-08-03 20:36:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-08-03 20:36:03 +0000
commit766cb6d8e8aa862760d6933a15efdf26e46ca367 (patch)
treedaccd75a7c4cb412907960fec31d8bc938a2a8ea /sys/arch
parent946fe0f37d990e66a4d0af3d336ca89e7234a171 (diff)
when not dealing with floats, always multiply before dividing; from Przemyslaw Nowaczyk
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/p4tcc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/p4tcc.c b/sys/arch/i386/i386/p4tcc.c
index d40733c1063..5265d740c98 100644
--- a/sys/arch/i386/i386/p4tcc.c
+++ b/sys/arch/i386/i386/p4tcc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p4tcc.c,v 1.13 2006/12/20 17:50:40 gwk Exp $ */
+/* $OpenBSD: p4tcc.c,v 1.14 2007/08/03 20:36:02 deraadt Exp $ */
/*
* Copyright (c) 2003 Ted Unangst
* All rights reserved.
@@ -102,7 +102,7 @@ p4tcc_init(int family, int step)
int
p4tcc_cpuspeed(int *speed)
{
- *speed = cpuspeed / 100 * (p4tcc_level + 12);
+ *speed = cpuspeed * (p4tcc_level + 12) / 100;
return 0;
}