mirror of https://github.com/xzeldon/htop.git
Avoid shadowing of variables
This commit is contained in:
parent
85ff6960ed
commit
13b1e96b12
|
@ -375,9 +375,9 @@ Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width) {
|
||||||
for (int i = 0; i < pl->cpuCount; i++) {
|
for (int i = 0; i < pl->cpuCount; i++) {
|
||||||
char number[16];
|
char number[16];
|
||||||
xSnprintf(number, 9, "CPU %d", Settings_cpuId(pl->settings, i));
|
xSnprintf(number, 9, "CPU %d", Settings_cpuId(pl->settings, i));
|
||||||
unsigned width = 4 + strlen(number);
|
unsigned cpu_width = 4 + strlen(number);
|
||||||
if (width > this->width)
|
if (cpu_width > this->width)
|
||||||
this->width = width;
|
this->width = cpu_width;
|
||||||
|
|
||||||
bool isSet = false;
|
bool isSet = false;
|
||||||
if (curCpu < affinity->used && affinity->cpus[curCpu] == i) {
|
if (curCpu < affinity->used && affinity->cpus[curCpu] == i) {
|
||||||
|
|
Loading…
Reference in New Issue