mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user