summaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/lscpu.c')
-rw-r--r--sys-utils/lscpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 122acca1a..57f097dae 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -837,7 +837,7 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod)
desc->hypervisor = "PR/SM";
desc->virtype = VIRT_FULL;
while (fgets(buf, sizeof(buf), fd) != NULL) {
- char *str;
+ char *str, *p;
if (!strstr(buf, "Control Program:"))
continue;
@@ -845,10 +845,10 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod)
desc->hyper = HYPER_IBM;
else
desc->hyper = HYPER_KVM;
- str = strchr(buf, ':');
- if (!str)
+ p = strchr(buf, ':');
+ if (!p)
continue;
- xasprintf(&str, "%s", str + 1);
+ xasprintf(&str, "%s", p + 1);
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')