From 2d1042adb382aa95456beff31b40abb7196567a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 6 Oct 2020 13:13:16 +0200 Subject: Save text buffer in Meter --- linux/PressureStallMeter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/PressureStallMeter.c') diff --git a/linux/PressureStallMeter.c b/linux/PressureStallMeter.c index 7486968f..238df7e4 100644 --- a/linux/PressureStallMeter.c +++ b/linux/PressureStallMeter.c @@ -25,7 +25,7 @@ static const int PressureStallMeter_attributes[] = { PRESSURE_STALL_THREEHUNDRED }; -static void PressureStallMeter_updateValues(Meter* this, char* buffer, size_t len) { +static void PressureStallMeter_updateValues(Meter* this) { const char* file; if (strstr(Meter_name(this), "CPU")) { file = "cpu"; @@ -47,7 +47,7 @@ static void PressureStallMeter_updateValues(Meter* this, char* buffer, size_t le /* only print bar for ten (not sixty and threehundred), cause the sum is meaningless */ this->curItems = 1; - xSnprintf(buffer, len, "%s %s %5.2lf%% %5.2lf%% %5.2lf%%", some ? "some" : "full", file, this->values[0], this->values[1], this->values[2]); + xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%s %s %5.2lf%% %5.2lf%% %5.2lf%%", some ? "some" : "full", file, this->values[0], this->values[1], this->values[2]); } static void PressureStallMeter_display(const Object* cast, RichString* out) { -- cgit v1.2.3