mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 04:04:35 +03:00
Remove duplicate field LinuxProcess->procCmdlineBasenameEnd
This field held practically the same value as cmdlineBasenameEnd
This commit is contained in:
@ -1133,10 +1133,9 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc
|
||||
LinuxProcess *lp = (LinuxProcess *)process;
|
||||
lp->mergedCommand.maxLen = lastChar + 1; /* accommodate cmdline */
|
||||
if (!process->cmdline || !String_eq(command, process->cmdline)) {
|
||||
process->cmdlineBasenameOffset = tokenEnd;
|
||||
free_and_xStrdup(&process->cmdline, command);
|
||||
lp->procCmdlineBasenameOffset = tokenStart;
|
||||
lp->procCmdlineBasenameEnd = tokenEnd;
|
||||
process->cmdlineBasenameOffset = tokenEnd;
|
||||
lp->mergedCommand.cmdlineChanged = true;
|
||||
}
|
||||
|
||||
@ -1465,14 +1464,12 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
|
||||
proc->cmdlineBasenameOffset = -1;
|
||||
free_and_xStrdup(&proc->cmdline, command);
|
||||
lp->procCmdlineBasenameOffset = 0;
|
||||
lp->procCmdlineBasenameEnd = 0;
|
||||
lp->mergedCommand.commChanged = true;
|
||||
} else if (Process_isThread(proc)) {
|
||||
if (settings->showThreadNames || Process_isKernelThread(proc)) {
|
||||
proc->cmdlineBasenameOffset = -1;
|
||||
free_and_xStrdup(&proc->cmdline, command);
|
||||
lp->procCmdlineBasenameOffset = 0;
|
||||
lp->procCmdlineBasenameEnd = 0;
|
||||
lp->mergedCommand.commChanged = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user