Merge branch 'avoid-shadowing' of https://github.com/BenBE/htop into BenBE-avoid-shadowing

This commit is contained in:
Nathan Scott 2020-09-09 19:40:50 +10:00
commit 35c3a95ff9
1 changed files with 3 additions and 3 deletions

View File

@ -368,9 +368,9 @@ Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width) {
for (int i = 0; i < pl->cpuCount; i++) {
char number[16];
xSnprintf(number, 9, "CPU %d", Settings_cpuId(pl->settings, i));
unsigned width = 4 + strlen(number);
if (width > this->width)
this->width = width;
unsigned cpu_width = 4 + strlen(number);
if (cpu_width > this->width)
this->width = cpu_width;
bool isSet = false;
if (curCpu < affinity->used && affinity->cpus[curCpu] == i) {