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 /openbsd/OpenBSDProcess.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 'openbsd/OpenBSDProcess.c')
-rw-r--r-- | openbsd/OpenBSDProcess.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c index 9756f9bb..0ac08c66 100644 --- a/openbsd/OpenBSDProcess.c +++ b/openbsd/OpenBSDProcess.c @@ -16,7 +16,7 @@ in the source distribution for its full text. #include "XUtils.h" -ProcessFieldData Process_fields[] = { +ProcessFieldData Process_fields[LAST_PROCESSFIELD] = { [0] = { .name = "", .title = NULL, @@ -167,12 +167,6 @@ ProcessFieldData Process_fields[] = { .description = "Thread group ID (i.e. process ID)", .flags = 0, }, - [LAST_PROCESSFIELD] = { - .name = "*** report bug! ***", - .title = NULL, - .description = NULL, - .flags = 0, - }, }; ProcessPidColumn Process_pidColumns[] = { @@ -219,7 +213,7 @@ static long OpenBSDProcess_compareByKey(const Process* v1, const Process* v2, Pr // remove if actually used (void)p1; (void)p2; - switch ((int) key) { + switch (key) { // add OpenBSD-specific fields here default: return Process_compareByKey_Base(v1, v2, key); |