summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-09-13 23:30:35 -0400
committerDave Jones <davej@redhat.com>2006-09-13 23:30:35 -0400
commitd452eea44a4f9e7810b6a4da9606d65bbed9d57c (patch)
tree71b083f97ddea626c1e74b9a4028b45de2d9f112
parentdff6e5d5c70d343fa5d80cab8c43866c9c5562b7 (diff)
Trim trailing zeros from GHz output.
-rw-r--r--x86info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86info.c b/x86info.c
index a1dd9b2..c0a11a9 100644
--- a/x86info.c
+++ b/x86info.c
@@ -268,7 +268,7 @@ int main (int argc, char **argv)
int b = ((cpu->MHz % 1000)/100);
int c = (a*1000)+(b*100);
- printf("%u.%u%uGHz", a, b, cpu->MHz - c);
+ printf("%u.%u%uGHz", a, b, (cpu->MHz - c)/10);
}
printf (" processor (estimate).\n\n");
}