diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 19:44:48 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-12-19 21:13:32 +0100 |
commit | 89473cc9ae950bbb5e291d1f186d372f66f66394 (patch) | |
tree | d1e21dbd0df28c00c467695711c8dde884e746a1 /htop.c | |
parent | d872e363081a892d65dede6a90721d3a2e8b0ee6 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) { |