From 2aacbf84cb397e17e677b7e46cc4548ab599493a Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Wed, 29 Nov 2023 21:27:07 +0100 Subject: Use consistent style for process field output/compare functions --- openbsd/OpenBSDProcess.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'openbsd') diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c index b1958a15..681d516d 100644 --- a/openbsd/OpenBSDProcess.c +++ b/openbsd/OpenBSDProcess.c @@ -220,17 +220,19 @@ void Process_delete(Object* cast) { } static void OpenBSDProcess_rowWriteField(const Row* super, RichString* str, ProcessField field) { - //const OpenBSDProcess* op = (const OpenBSDProcess*) super; - const Process* this = (const Process*) super; + const OpenBSDProcess* op = (const OpenBSDProcess*) super; + char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; - //int n = sizeof(buffer) - 1; + //size_t n = sizeof(buffer) - 1; + switch (field) { // add OpenBSD-specific fields here default: - Process_writeField(this, str, field); + Process_writeField(&op->super, str, field); return; } + RichString_appendWide(str, attr, buffer); } -- cgit v1.2.3