Process: drop commLen

It is only used on Linux to optimize memory handling in case the command
changes to a smaller-or-equal string.

This "optimization" however causes more code bloat and maintenance cost
on string handling issues than it gains.
This commit is contained in:
Christian Göttsche
2021-01-05 14:53:07 +01:00
committed by BenBE
parent 70f48f1f44
commit d9240999e9
3 changed files with 7 additions and 25 deletions

View File

@ -351,7 +351,6 @@ int SolarisProcessList_walkproc(psinfo_t* _psinfo, lwpsinfo_t* _lwpsinfo, void*
sproc->zname = SolarisProcessList_readZoneName(spl->kd, sproc);
proc->user = UsersTable_getRef(pl->usersTable, proc->st_uid);
proc->comm = xStrdup(_psinfo->pr_fname);
proc->commLen = strnlen(_psinfo->pr_fname, PRFNSZ);
}
// End common code pass 1