Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Reorder slightly to eliminate bogus initi...
details: https://anonhg.NetBSD.org/src/rev/5806ab681cf9
branches: trunk
changeset: 554508:5806ab681cf9
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Oct 29 02:02:05 2003 +0000
description:
Reorder slightly to eliminate bogus initializers.
diffstat:
sys/arch/i386/i386/procfs_machdep.c | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diffs (51 lines):
diff -r a159e56f59ac -r 5806ab681cf9 sys/arch/i386/i386/procfs_machdep.c
--- a/sys/arch/i386/i386/procfs_machdep.c Wed Oct 29 01:54:24 2003 +0000
+++ b/sys/arch/i386/i386/procfs_machdep.c Wed Oct 29 02:02:05 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_machdep.c,v 1.16 2003/10/25 18:40:37 christos Exp $ */
+/* $NetBSD: procfs_machdep.c,v 1.17 2003/10/29 02:02:05 mycroft Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.16 2003/10/25 18:40:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.17 2003/10/29 02:02:05 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,15 +78,6 @@
{
int left, l, i;
char featurebuf[256], *p;
- u_int64_t freq, fraq;
-
- if (cpu_info_list->ci_tsc_freq != 0) {
- freq = (cpu_info_list->ci_tsc_freq + 4999) / 1000000;
- fraq = ((cpu_info_list->ci_tsc_freq + 4999) / 10000) % 100;
- } else {
- freq = 0; /* XXX: gcc */
- fraq = 0;
- }
p = featurebuf;
left = sizeof featurebuf;
@@ -134,10 +125,14 @@
return 0;
- if (cpu_info_list->ci_tsc_freq != 0)
+ if (cpu_info_list->ci_tsc_freq != 0) {
+ u_int64_t freq, fraq;
+
+ freq = (cpu_info_list->ci_tsc_freq + 4999) / 1000000;
+ fraq = ((cpu_info_list->ci_tsc_freq + 4999) / 10000) % 100;
l = snprintf(p, left, "cpu MHz\t\t: %qd.%qd\n",
freq, fraq);
- else
+ } else
l = snprintf(p, left, "cpu MHz\t\t: unknown\n");
left -= l;
Home |
Main Index |
Thread Index |
Old Index