From 87790d71e679ba745d407249b4b2dad992b8a01d Mon Sep 17 00:00:00 2001 From: Daniel Reinhold Date: Tue, 22 Oct 2002 11:36:29 +0000 Subject: [PATCH] fixed a minor error and some typos git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1593 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/apps/cpuinfo/main.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/kernel/apps/cpuinfo/main.c b/src/kernel/apps/cpuinfo/main.c index 7d5b80ffd0..bfa5bcf588 100644 --- a/src/kernel/apps/cpuinfo/main.c +++ b/src/kernel/apps/cpuinfo/main.c @@ -383,9 +383,9 @@ Intel_TLB_cache(cpuid_info *info) // a particular cache type will display together. // // After the pass loop is finished, the slot array contains the indexes of all the - // table entries that apply to the host processor. Displaying the info merely a matter - // of spinning thru the slot array and printing the text. The output is organized by - // the cache types -- this technique *only* works because the TLB/Cache table has been + // table entries that apply to the host processor. Displaying the info is merely a matter + // of spinning thru the slot array and printing the text. The output, however, is organized + // by the cache types -- this technique *only* works because the TLB/Cache table has been // carefully arranged in that order. #define BIT_31_MASK (1 << 31) @@ -407,7 +407,7 @@ Intel_TLB_cache(cpuid_info *info) indexOf[tab[n++].descriptor] = i++; - // pass loop: insert relevant table indexes into the slots array + // pass loop: insert relevant table indexes into the slot array i = 0; for (pass = 0; ; ++pass) { get_cpuid(info, 2, 0); @@ -418,27 +418,27 @@ Intel_TLB_cache(cpuid_info *info) break; reg >>= 8; // skip low byte - while ((db = (reg & 0xff))) - insert(slot, indexOf[db], i++), - reg >>= 8; + for (; reg; reg >>= 8) + if ((db = (reg & 0xff))) + insert(slot, indexOf[db], i++); reg = info->regs.ebx; // ebx if ((reg & BIT_31_MASK) == 0) - while ((db = (reg & 0xff))) - insert(slot, indexOf[db], i++), - reg >>= 8; + for (; reg; reg >>= 8) + if ((db = (reg & 0xff))) + insert(slot, indexOf[db], i++); reg = info->regs.ecx; // ecx if ((reg & BIT_31_MASK) == 0) - while ((db = (reg & 0xff))) - insert(slot, indexOf[db], i++), - reg >>= 8; + for (; reg; reg >>= 8) + if ((db = (reg & 0xff))) + insert(slot, indexOf[db], i++); reg = info->regs.edx; // edx if ((reg & BIT_31_MASK) == 0) - while ((db = (reg & 0xff))) - insert(slot, indexOf[db], i++), - reg >>= 8; + for (; reg; reg >>= 8) + if ((db = (reg & 0xff))) + insert(slot, indexOf[db], i++); }