summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-15 19:44:48 +0100
committercgzones <cgzones@googlemail.com>2020-12-19 21:13:32 +0100
commit89473cc9ae950bbb5e291d1f186d372f66f66394 (patch)
treed1e21dbd0df28c00c467695711c8dde884e746a1 /htop.c
parentd872e363081a892d65dede6a90721d3a2e8b0ee6 (diff)
Rework enum ProcessField
Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/htop.c b/htop.c
index 7d67a05a..4b43ed2a 100644
--- a/htop.c
+++ b/htop.c
@@ -125,14 +125,14 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
case 's':
assert(optarg); /* please clang analyzer, cause optarg can be NULL in the 'u' case */
if (String_eq(optarg, "help")) {
- for (int j = 1; j < Platform_numberOfFields; j++) {
+ for (int j = 1; j < LAST_PROCESSFIELD; j++) {
const char* name = Process_fields[j].name;
if (name) printf ("%s\n", name);
}
exit(0);
}
flags.sortKey = 0;
- for (int j = 1; j < Platform_numberOfFields; j++) {
+ for (int j = 1; j < LAST_PROCESSFIELD; j++) {
if (Process_fields[j].name == NULL)
continue;
if (String_eq(optarg, Process_fields[j].name)) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy