summaryrefslogtreecommitdiffstats
path: root/solaris
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-21 21:26:05 +0200
committercgzones <cgzones@googlemail.com>2020-10-26 19:30:38 +0100
commit4eb443926f9944f4c100b1aabfb5553cbbd98874 (patch)
tree96f71b219565cc36a98e447aebfe5ae46b94ec49 /solaris
parent71091724319c85574f5dbb11230ef5fe463f12fd (diff)
Hold only a const version of Settings in Process
Diffstat (limited to 'solaris')
-rw-r--r--solaris/SolarisProcess.c4
-rw-r--r--solaris/SolarisProcess.h2
-rw-r--r--solaris/SolarisProcessList.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c
index 13652bd3..9c6c7d77 100644
--- a/solaris/SolarisProcess.c
+++ b/solaris/SolarisProcess.c
@@ -79,11 +79,11 @@ ProcessPidColumn Process_pidColumns[] = {
{ .id = 0, .label = NULL },
};
-SolarisProcess* SolarisProcess_new(Settings* settings) {
+Process* SolarisProcess_new(const Settings* settings) {
SolarisProcess* this = xCalloc(1, sizeof(SolarisProcess));
Object_setClass(this, Class(SolarisProcess));
Process_init(&this->super, settings);
- return this;
+ return &this->super;
}
void Process_delete(Object* cast) {
diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h
index 23012a2f..4756634d 100644
--- a/solaris/SolarisProcess.h
+++ b/solaris/SolarisProcess.h
@@ -50,7 +50,7 @@ extern ProcessFieldData Process_fields[];
extern ProcessPidColumn Process_pidColumns[];
-SolarisProcess* SolarisProcess_new(Settings* settings);
+Process* SolarisProcess_new(const Settings* settings);
void Process_delete(Object* cast);
diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c
index 85fc955b..72806134 100644
--- a/solaris/SolarisProcessList.c
+++ b/solaris/SolarisProcessList.c
@@ -279,7 +279,7 @@ int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void *
} else {
getpid = lwpid;
}
- Process *proc = ProcessList_getProcess(pl, getpid, &preExisting, (Process_New) SolarisProcess_new);
+ Process *proc = ProcessList_getProcess(pl, getpid, &preExisting, SolarisProcess_new);
SolarisProcess *sproc = (SolarisProcess*) proc;
// Common code pass 1

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