lscpu: fix variable shadowing
sys-utils/lscpu-virt.c: In function ‘lscpu_read_virtualization’: sys-utils/lscpu-virt.c:574:9: warning: declaration of ‘buf’ shadows a previous local [-Wshadow] 574 | char buf[256]; | ^~~ sys-utils/lscpu-virt.c:506:7: note: shadowed declaration is here 506 | char buf[BUFSIZ]; | ^~~ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
e69cb8b91d
commit
01258182bb
|
@ -571,10 +571,10 @@ struct lscpu_virt *lscpu_read_virtualization(struct lscpu_cxt *cxt)
|
|||
|
||||
fd = ul_path_fopen(cxt->procfs, "r", "xen/capabilities");
|
||||
if (fd) {
|
||||
char buf[256];
|
||||
char xenbuf[256];
|
||||
|
||||
if (fscanf(fd, "%255s", buf) == 1 &&
|
||||
!strcmp(buf, "control_d"))
|
||||
if (fscanf(fd, "%255s", xenbuf) == 1 &&
|
||||
!strcmp(xenbuf, "control_d"))
|
||||
dom0 = 1;
|
||||
fclose(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue