From 9f67b95308d11ee922e92f0649c2796bac58c1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Wed, 4 Nov 2020 17:46:14 +0100 Subject: [PATCH] Mark local functions static --- linux/LinuxProcess.c | 24 ++++++++++++------------ linux/LinuxProcess.h | 4 ---- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index cd8db3d0..2fec52f1 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -128,16 +128,6 @@ ProcessPidColumn Process_pidColumns[] = { { .id = 0, .label = NULL }, }; -const ProcessClass LinuxProcess_class = { - .super = { - .extends = Class(Process), - .display = Process_display, - .delete = Process_delete, - .compare = LinuxProcess_compare - }, - .writeField = LinuxProcess_writeField, -}; - Process* LinuxProcess_new(const Settings* settings) { LinuxProcess* this = xCalloc(1, sizeof(LinuxProcess)); Object_setClass(this, Class(LinuxProcess)); @@ -203,7 +193,7 @@ void LinuxProcess_printDelay(float delay_percent, char* buffer, int n) { } #endif -void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field) { +static void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field) { const LinuxProcess* lp = (const LinuxProcess*) this; bool coloring = this->settings->highlightMegabytes; char buffer[256]; buffer[255] = '\0'; @@ -304,7 +294,7 @@ void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField RichString_append(str, attr, buffer); } -long LinuxProcess_compare(const void* v1, const void* v2) { +static long LinuxProcess_compare(const void* v1, const void* v2) { const LinuxProcess *p1, *p2; const Settings *settings = ((const Process*)v1)->settings; @@ -401,3 +391,13 @@ long LinuxProcess_compare(const void* v1, const void* v2) { bool Process_isThread(const Process* this) { return (Process_isUserlandThread(this) || Process_isKernelThread(this)); } + +const ProcessClass LinuxProcess_class = { + .super = { + .extends = Class(Process), + .display = Process_display, + .delete = Process_delete, + .compare = LinuxProcess_compare + }, + .writeField = LinuxProcess_writeField +}; diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 1285529a..856b7bee 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -181,10 +181,6 @@ bool LinuxProcess_setIOPriority(Process* this, Arg ioprio); void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); #endif -void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field); - -long LinuxProcess_compare(const void* v1, const void* v2); - bool Process_isThread(const Process* this); #endif