diff options
author | Daniel Lange <DLange@git.local> | 2023-02-05 04:25:56 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2023-02-05 04:25:56 +0100 |
commit | f288666edc9180a2e81e6655951878124f321df6 (patch) | |
tree | da70bf44b2423f6f8e9a070c063fed79d190b489 /ProcessList.c | |
parent | 937052b231259a47d881d539ad5748245ef55b99 (diff) | |
download | debian_htop-f288666edc9180a2e81e6655951878124f321df6.tar.gz debian_htop-f288666edc9180a2e81e6655951878124f321df6.tar.bz2 debian_htop-f288666edc9180a2e81e6655951878124f321df6.zip |
New upstream version 3.2.2upstream/3.2.2
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ProcessList.c b/ProcessList.c index bbaddd8..d115678 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -199,7 +199,7 @@ static void ProcessList_removeIndex(ProcessList* this, const Process* p, int idx assert(Vector_countEquals(this->processes, Hashtable_count(this->processTable))); } -static void ProcessList_buildTreeBranch(ProcessList* this, pid_t pid, int level, int indent, bool show) { +static void ProcessList_buildTreeBranch(ProcessList* this, pid_t pid, unsigned int level, int32_t indent, bool show) { // On OpenBSD the kernel thread 'swapper' has pid 0. // Do not treat it as root of any tree. if (pid == 0) @@ -239,7 +239,7 @@ static void ProcessList_buildTreeBranch(ProcessList* this, pid_t pid, int level, Vector_add(this->displayList, process); - int nextIndent = indent | (1 << level); + int32_t nextIndent = indent | ((int32_t)1 << MINIMUM(level, sizeof(process->indent) * 8 - 2)); ProcessList_buildTreeBranch(this, process->pid, level + 1, (i < lastShown) ? nextIndent : indent, process->show && process->showChildren); if (i == lastShown) { process->indent = -nextIndent; |