summaryrefslogtreecommitdiffstats
path: root/solaris
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-29 21:27:07 +0100
committerBenBE <BenBE@geshi.org>2023-12-26 15:14:19 +0100
commit2aacbf84cb397e17e677b7e46cc4548ab599493a (patch)
treed6fd34701f8c90cc52bc4c43e6df32c2fcc50545 /solaris
parent6aa9ef2726e42c4ae062b55be4d5cc015767d997 (diff)
Use consistent style for process field output/compare functions
Diffstat (limited to 'solaris')
-rw-r--r--solaris/SolarisProcess.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c
index 35a462d7..5a11011d 100644
--- a/solaris/SolarisProcess.c
+++ b/solaris/SolarisProcess.c
@@ -75,9 +75,11 @@ void Process_delete(Object* cast) {
static void SolarisProcess_rowWriteField(const Row* super, RichString* str, ProcessField field) {
const SolarisProcess* sp = (const SolarisProcess*) 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 Solaris-specific fields here
case ZONEID: xSnprintf(buffer, n, "%*d ", Process_pidDigits, sp->zoneid); break;
@@ -94,6 +96,7 @@ static void SolarisProcess_rowWriteField(const Row* super, RichString* str, Proc
Process_writeField(&sp->super, str, field);
return;
}
+
RichString_appendWide(str, attr, buffer);
}

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