mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +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:
@ -406,7 +406,6 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field
|
||||
void Process_display(const Object* cast, RichString* out) {
|
||||
const Process* this = (const Process*) cast;
|
||||
const ProcessField* fields = this->settings->fields;
|
||||
RichString_prune(out);
|
||||
for (int i = 0; fields[i]; i++)
|
||||
As_Process(this)->writeField(this, out, fields[i]);
|
||||
|
||||
|
Reference in New Issue
Block a user