From 1e806f9899600256cbcc540715261f461e11dd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 7 Mar 2021 15:31:41 +0100 Subject: RichString: do not unnecessarily clean whole buffer The local stack buffer does not need to be cleaned to zeros when - just initialized, cause the length is set to 0 and the first character is set to '\0', so all printing functions will safely stop - no further used, i.e. the variable goes out of scope --- CPUMeter.c | 1 - 1 file changed, 1 deletion(-) (limited to 'CPUMeter.c') diff --git a/CPUMeter.c b/CPUMeter.c index b9bc67fc..d052bdcc 100644 --- a/CPUMeter.c +++ b/CPUMeter.c @@ -102,7 +102,6 @@ static void CPUMeter_updateValues(Meter* this) { static void CPUMeter_display(const Object* cast, RichString* out) { char buffer[50]; const Meter* this = (const Meter*)cast; - RichString_prune(out); if (this->param > this->pl->cpuCount) { RichString_appendAscii(out, CRT_colors[METER_TEXT], "absent"); return; -- cgit v1.2.3