Declare for loop variables inside the loop

This commit is contained in:
Christian Göttsche
2021-01-05 23:47:20 +01:00
parent 7ff654f2df
commit e103ec0317
2 changed files with 3 additions and 4 deletions

View File

@ -187,8 +187,8 @@ static inline void Process_writeCommand(const Process* this, int attr, int basea
const char* comm = this->comm;
if (this->settings->highlightBaseName || !this->settings->showProgramPath) {
int i, basename = 0;
for (i = 0; i < this->basenameOffset; i++) {
int basename = 0;
for (int i = 0; i < this->basenameOffset; i++) {
if (comm[i] == '/') {
basename = i + 1;
} else if (comm[i] == ':') {