diff --git a/headers/private/shared/cpu_type.h b/headers/private/shared/cpu_type.h index 75efbcef68..52265eeb02 100644 --- a/headers/private/shared/cpu_type.h +++ b/headers/private/shared/cpu_type.h @@ -214,15 +214,12 @@ get_rounded_cpu_speed(void) int target = sys_info.cpu_clock_speed / 1000000; int frac = target % 100; int delta = -frac; - int at = 0; int freqs[] = { 100, 50, 25, 75, 33, 67, 20, 40, 60, 80, 10, 30, 70, 90 }; for (uint x = 0; x < sizeof(freqs) / sizeof(freqs[0]); x++) { int ndelta = freqs[x] - frac; - if (abs(ndelta) < abs(delta)) { - at = freqs[x]; + if (abs(ndelta) < abs(delta)) delta = ndelta; - } } return target + delta; } diff --git a/src/apps/abouthaiku/AboutHaiku.cpp b/src/apps/abouthaiku/AboutHaiku.cpp index 50efd059d7..da7676f379 100644 --- a/src/apps/abouthaiku/AboutHaiku.cpp +++ b/src/apps/abouthaiku/AboutHaiku.cpp @@ -208,7 +208,7 @@ AboutView::AboutView(const BRect &r) r.bottom = r.top + textHeight; int32 clockSpeed = get_rounded_cpu_speed(); - if (clockSpeed < 1000000000) + if (clockSpeed < 1000) sprintf(string,"%ld MHz", clockSpeed); else sprintf(string,"%.2f GHz", clockSpeed / 1000.0f);