summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2022-10-01 00:00:00 -0500
committerCraig Small <csmall@dropbear.xyz>2022-10-04 10:57:34 +1100
commitf571746af2ed7a7278cf7a9a742a5b9cf8183710 (patch)
tree676f2fe3c27855e7200af4e92c4b844d0dca062b /library
parent850548bdb47172e23662298a8a090454292eae54 (diff)
downloadprocps-ng-f571746af2ed7a7278cf7a9a742a5b9cf8183710.tar.gz
library: tweak support of p-core/e-core identification
Wow, after this we'll eliminate one 'jmp' instruction! [ plus we can also save a single precious whitespace ] Signed-off-by: Jim Warner <james.warner@comcast.net>
Diffstat (limited to 'library')
-rw-r--r--library/stat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/library/stat.c b/library/stat.c
index c7cdef5..60d7364 100644
--- a/library/stat.c
+++ b/library/stat.c
@@ -468,11 +468,10 @@ static void stat_cores_check (
}
if (p_core) {
core = info->cores;
- while (core) {
+ do {
if (core->thread_2 == VACANT)
core->type = E_CORE;
- core = core->next;
- }
+ } while ((core = core->next));
}
} // end: stat_cores_check
@@ -530,7 +529,7 @@ static int stat_cores_verify (
{ static int fake_core;
if (a_cpu > ECORE_BEGIN) {
if (!fake_core) fake_core = a_core + 1;
- a_core = fake_core++;
+ a_core = fake_core++;
} }
#endif
if (!stat_core_add(info, a_core, a_cpu)) {