mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
avoid global variable shadowed
If "conf/domain_conf.h" included in file nodeinfo.c, gcc complains about a variable shadowing. fix it for potential further including of the file. ref: https://www.redhat.com/archives/libvir-list/2012-February/msg00955.html
This commit is contained in:
parent
3c30fbcd4a
commit
362077e752
@ -206,7 +206,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
|||||||
DIR *cpudir = NULL;
|
DIR *cpudir = NULL;
|
||||||
struct dirent *cpudirent = NULL;
|
struct dirent *cpudirent = NULL;
|
||||||
unsigned int cpu;
|
unsigned int cpu;
|
||||||
unsigned long core, socket, cur_threads;
|
unsigned long core, sock, cur_threads;
|
||||||
cpu_set_t core_mask;
|
cpu_set_t core_mask;
|
||||||
cpu_set_t socket_mask;
|
cpu_set_t socket_mask;
|
||||||
int online;
|
int online;
|
||||||
@ -311,9 +311,9 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Parse socket */
|
/* Parse socket */
|
||||||
socket = parse_socket(cpu);
|
sock = parse_socket(cpu);
|
||||||
if (!CPU_ISSET(socket, &socket_mask)) {
|
if (!CPU_ISSET(sock, &socket_mask)) {
|
||||||
CPU_SET(socket, &socket_mask);
|
CPU_SET(sock, &socket_mask);
|
||||||
nodeinfo->sockets++;
|
nodeinfo->sockets++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user