summaryrefslogtreecommitdiffstats
path: root/linux/SystemdMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-06 13:13:16 +0200
committerBenBE <BenBE@geshi.org>2021-03-04 23:57:45 +0100
commit2d1042adb382aa95456beff31b40abb7196567a0 (patch)
tree29e1a48c2927ce887a777b20847efae16b73c977 /linux/SystemdMeter.c
parent23c5b9ce3c50a7c7aaa9a5734cad50d12610d8d8 (diff)
Save text buffer in Meter
Diffstat (limited to 'linux/SystemdMeter.c')
-rw-r--r--linux/SystemdMeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/SystemdMeter.c b/linux/SystemdMeter.c
index 54abbe50..24a47f74 100644
--- a/linux/SystemdMeter.c
+++ b/linux/SystemdMeter.c
@@ -262,7 +262,7 @@ static void updateViaExec(void) {
fclose(commandOutput);
}
-static void SystemdMeter_updateValues(ATTR_UNUSED Meter* this, char* buffer, size_t size) {
+static void SystemdMeter_updateValues(Meter* this) {
free(systemState);
systemState = NULL;
nFailedUnits = nInstalledJobs = nNames = nJobs = INVALID_VALUE;
@@ -274,7 +274,7 @@ static void SystemdMeter_updateValues(ATTR_UNUSED Meter* this, char* buffer, siz
updateViaExec();
#endif /* !BUILD_STATIC || HAVE_LIBSYSTEMD */
- xSnprintf(buffer, size, "%s", systemState ? systemState : "???");
+ xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%s", systemState ? systemState : "???");
}
static int zeroDigitColor(unsigned int value) {

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