summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-04-17 19:04:05 +0200
committerChristian Göttsche <cgzones@googlemail.com>2024-01-20 11:57:00 +0100
commit8e11f1f6568252792905b5123ed98b842a648788 (patch)
tree856a10289e0630f35f8c639a839faa0c185513ce
parent85e4e0219311eff496a692a9481bfd995a0b9738 (diff)
Linux: rename variable for clearer intent
Make it more clear the variable stores the previous tty number (similar to lasttimes), while the current one gets set in the intermediate LinuxProcessTable_readStatFile().
-rw-r--r--linux/LinuxProcessTable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/LinuxProcessTable.c b/linux/LinuxProcessTable.c
index 039a64ec..1799ffa7 100644
--- a/linux/LinuxProcessTable.c
+++ b/linux/LinuxProcessTable.c
@@ -1495,7 +1495,7 @@ static bool LinuxProcessTable_recurseProcTree(LinuxProcessTable* this, openat_ar
char statCommand[MAX_NAME + 1];
unsigned long long int lasttimes = (lp->utime + lp->stime);
- unsigned long int tty_nr = proc->tty_nr;
+ unsigned long int last_tty_nr = proc->tty_nr;
if (!LinuxProcessTable_readStatFile(lp, procFd, lhost, scanMainThread, statCommand, sizeof(statCommand)))
goto errorReadingProcess;
@@ -1503,7 +1503,7 @@ static bool LinuxProcessTable_recurseProcTree(LinuxProcessTable* this, openat_ar
proc->isKernelThread = true;
}
- if (tty_nr != proc->tty_nr && this->ttyDrivers) {
+ if (last_tty_nr != proc->tty_nr && this->ttyDrivers) {
free(proc->tty_name);
proc->tty_name = LinuxProcessTable_updateTtyDevice(this->ttyDrivers, proc->tty_nr);
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy